[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v1 02/25] s390x: virtio-ccw: Remove un-needed if
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [RFC PATCH v1 02/25] s390x: virtio-ccw: Remove un-needed if guard |
Date: |
Thu, 10 Sep 2015 22:33:12 -0700 |
error_propagate is already NULL safe. Remove these un-needed if
guards.
Cc: Richard Henderson <address@hidden>
Cc: Alexander Graf <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
---
hw/s390x/virtio-ccw.c | 28 +++++++---------------------
1 file changed, 7 insertions(+), 21 deletions(-)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index d36373e..db085bc 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -957,9 +957,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)
@@ -980,9 +978,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)
@@ -1017,9 +1013,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);
}
@@ -1039,9 +1033,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)
@@ -1077,9 +1069,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)
@@ -1101,9 +1091,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)
@@ -1891,9 +1879,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)
--
1.9.1
- [Qemu-devel] [RFC PATCH v1 00/25] error: Automatic error concatenation and prefixing, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 01/25] exec: convert error_report to error_report_err, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 02/25] s390x: virtio-ccw: Remove un-needed if guard,
Peter Crosthwaite <=
- [Qemu-devel] [RFC PATCH v1 03/25] error: Factor out common error setter logic, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 04/25] error: Add support for multiple errors, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 05/25] error: Add error prefix API, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 07/25] sysbus: mmio_map+mmio_get_region: ignore range OOB errors, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 06/25] error: Add error_printf_fn(), Peter Crosthwaite, 2015/09/11