diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ide/qdev.c | 4 | ||||
-rw-r--r-- | hw/net/ne2000-isa.c | 4 | ||||
-rw-r--r-- | hw/s390x/virtio-ccw.c | 28 | ||||
-rw-r--r-- | hw/usb/dev-storage.c | 4 |
4 files changed, 10 insertions, 30 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 4bc74a32d2..6842a5596a 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -233,9 +233,7 @@ static void ide_dev_set_bootindex(Object *obj, Visitor *v, const char *name, d->unit ? "/disk@1" : "/disk@0"); } out: - if (local_err) { - error_propagate(errp, local_err); - } + error_propagate(errp, local_err); } static void ide_dev_instance_init(Object *obj) diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c index a7f5a9464d..8fab7ae2ec 100644 --- a/hw/net/ne2000-isa.c +++ b/hw/net/ne2000-isa.c @@ -127,9 +127,7 @@ static void isa_ne2000_set_bootindex(Object *obj, Visitor *v, s->c.bootindex = boot_index; out: - if (local_err) { - error_propagate(errp, local_err); - } + error_propagate(errp, local_err); } static void isa_ne2000_instance_init(Object *obj) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 2192be8774..348ae4f668 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -890,9 +890,7 @@ static void virtio_ccw_net_realize(VirtioCcwDevice *ccw_dev, Error **errp) object_get_typename(OBJECT(qdev))); qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); object_property_set_bool(OBJECT(vdev), true, "realized", &err); - if (err) { - error_propagate(errp, err); - } + error_propagate(errp, err); } static void virtio_ccw_net_instance_init(Object *obj) @@ -913,9 +911,7 @@ static void virtio_ccw_blk_realize(VirtioCcwDevice *ccw_dev, Error **errp) qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); object_property_set_bool(OBJECT(vdev), true, "realized", &err); - if (err) { - error_propagate(errp, err); - } + error_propagate(errp, err); } static void virtio_ccw_blk_instance_init(Object *obj) @@ -950,9 +946,7 @@ static void virtio_ccw_serial_realize(VirtioCcwDevice *ccw_dev, Error **errp) qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); object_property_set_bool(OBJECT(vdev), true, "realized", &err); - if (err) { - error_propagate(errp, err); - } + error_propagate(errp, err); } @@ -972,9 +966,7 @@ static void virtio_ccw_balloon_realize(VirtioCcwDevice *ccw_dev, Error **errp) qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); object_property_set_bool(OBJECT(vdev), true, "realized", &err); - if (err) { - error_propagate(errp, err); - } + error_propagate(errp, err); } static void virtio_ccw_balloon_instance_init(Object *obj) @@ -1010,9 +1002,7 @@ static void virtio_ccw_scsi_realize(VirtioCcwDevice *ccw_dev, Error **errp) qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); object_property_set_bool(OBJECT(vdev), true, "realized", &err); - if (err) { - error_propagate(errp, err); - } + error_propagate(errp, err); } static void virtio_ccw_scsi_instance_init(Object *obj) @@ -1034,9 +1024,7 @@ static void vhost_ccw_scsi_realize(VirtioCcwDevice *ccw_dev, Error **errp) qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); object_property_set_bool(OBJECT(vdev), true, "realized", &err); - if (err) { - error_propagate(errp, err); - } + error_propagate(errp, err); } static void vhost_ccw_scsi_instance_init(Object *obj) @@ -1858,9 +1846,7 @@ static void virtio_ccw_9p_realize(VirtioCcwDevice *ccw_dev, Error **errp) qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); object_property_set_bool(OBJECT(vdev), true, "realized", &err); - if (err) { - error_propagate(errp, err); - } + error_propagate(errp, err); } static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 248a580457..9fd00dfffc 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -818,9 +818,7 @@ static void usb_msd_set_bootindex(Object *obj, Visitor *v, const char *name, } out: - if (local_err) { - error_propagate(errp, local_err); - } + error_propagate(errp, local_err); } static const TypeInfo usb_storage_dev_type_info = { |