]> git.proxmox.com Git - qemu.git/commitdiff
xilinx_axienet.c: Assert no error when making link
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Mon, 11 Feb 2013 07:16:05 +0000 (17:16 +1000)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 21 Feb 2013 09:33:39 +0000 (10:33 +0100)
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>
hw/xilinx_axienet.c

index 34e344ce2c5fae286c430b6ceb7fd649717013c6..e5d9251b8b6f51847a88380b9a6ea5e63137ea09 100644 (file)
@@ -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[] = {