diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2014-01-01 18:48:08 -0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-01-06 15:02:30 -0500 |
commit | 5433a0a89e68443c9ce1cd0c7b1af23320133983 (patch) | |
tree | ba5e35a6e5dd2655c087a48a43123cccc17e6ae8 /include/hw | |
parent | 90c3f6e02662d2d8edf059168a037a119ed208cb (diff) |
hw: Remove assert_no_error usages
Replace assert_no_error() usages with the error_abort system.
&error_abort is passed into API calls to signal to the Error sub-system
that any errors are fatal. Removes need for caller assertions.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/xilinx.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/include/hw/xilinx.h b/include/hw/xilinx.h index 0c0251a2e9..9d6debe4d0 100644 --- a/include/hw/xilinx.h +++ b/include/hw/xilinx.h @@ -59,16 +59,13 @@ xilinx_axiethernet_init(DeviceState *dev, NICInfo *nd, StreamSlave *ds, StreamSlave *cs, hwaddr base, qemu_irq irq, int txmem, int rxmem) { - Error *errp = NULL; - qdev_set_nic_properties(dev, nd); qdev_prop_set_uint32(dev, "rxmem", rxmem); qdev_prop_set_uint32(dev, "txmem", txmem); object_property_set_link(OBJECT(dev), OBJECT(ds), - "axistream-connected", &errp); + "axistream-connected", &error_abort); object_property_set_link(OBJECT(dev), OBJECT(cs), - "axistream-control-connected", &errp); - assert_no_error(errp); + "axistream-control-connected", &error_abort); qdev_init_nofail(dev); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq); @@ -78,14 +75,11 @@ static inline void xilinx_axidma_init(DeviceState *dev, StreamSlave *ds, StreamSlave *cs, hwaddr base, qemu_irq irq, qemu_irq irq2, int freqhz) { - Error *errp = NULL; - qdev_prop_set_uint32(dev, "freqhz", freqhz); object_property_set_link(OBJECT(dev), OBJECT(ds), - "axistream-connected", &errp); + "axistream-connected", &error_abort); object_property_set_link(OBJECT(dev), OBJECT(cs), - "axistream-control-connected", &errp); - assert_no_error(errp); + "axistream-control-connected", &error_abort); qdev_init_nofail(dev); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); |