aboutsummaryrefslogtreecommitdiff
path: root/hw/xilinx_axienet.c
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2013-02-11 17:16:05 +1000
committerStefan Hajnoczi <stefanha@redhat.com>2013-02-21 10:33:39 +0100
commitb15aaca4303fe009870842dd922a0128b332a2fd (patch)
treec9b557ab10af5ebbe4ca13c915d4a25f746703b1 /hw/xilinx_axienet.c
parent87f1361c193c77dad428a7aa9bdce7ae2b76871f (diff)
xilinx_axienet.c: Assert no error when making link
This gives an awful silent failure when it doesn't work. Assert against link creation failure. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/xilinx_axienet.c')
-rw-r--r--hw/xilinx_axienet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xilinx_axienet.c b/hw/xilinx_axienet.c
index 34e344ce2c..e5d9251b8b 100644
--- a/hw/xilinx_axienet.c
+++ b/hw/xilinx_axienet.c
@@ -869,9 +869,11 @@ static int xilinx_enet_init(SysBusDevice *dev)
static void xilinx_enet_initfn(Object *obj)
{
struct XilinxAXIEnet *s = FROM_SYSBUS(typeof(*s), SYS_BUS_DEVICE(obj));
+ Error *errp = NULL;
object_property_add_link(obj, "axistream-connected", TYPE_STREAM_SLAVE,
- (Object **) &s->tx_dev, NULL);
+ (Object **) &s->tx_dev, &errp);
+ assert_no_error(errp);
}
static Property xilinx_enet_properties[] = {