[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/15] error: Apply error_propagate_null.cocci again
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 15/15] error: Apply error_propagate_null.cocci again |
Date: |
Mon, 24 Apr 2017 09:27:00 +0200 |
From: Fam Zheng <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
hw/i386/pc.c | 4 +---
hw/s390x/virtio-ccw.c | 4 +---
hw/usb/bus.c | 4 +---
3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index d24388e..f3b372a 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1104,9 +1104,7 @@ static void pc_new_cpu(const char *typename, int64_t
apic_id, Error **errp)
object_property_set_bool(cpu, true, "realized", &local_err);
object_unref(cpu);
- if (local_err) {
- error_propagate(errp, local_err);
- }
+ error_propagate(errp, local_err);
}
void pc_hot_add_cpu(const int64_t id, Error **errp)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index f376381..e7167e3 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -1761,9 +1761,7 @@ static void vhost_vsock_ccw_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_vsock_ccw_class_init(ObjectClass *klass, void *data)
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index 24f1608..5939b27 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -762,9 +762,7 @@ static void usb_set_attached(Object *obj, bool value, Error
**errp)
if (value) {
usb_device_attach(dev, &err);
- if (err) {
- error_propagate(errp, err);
- }
+ error_propagate(errp, err);
} else {
usb_device_detach(dev);
}
--
2.7.4
- [Qemu-devel] [PULL 00/15] Error reporting patches for 2017-04-24, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 01/15] util/error: Fix leak in error_vprepend(), Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 02/15] socket: Make errp the last parameter of socket_connect, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 15/15] error: Apply error_propagate_null.cocci again,
Markus Armbruster <=
- [Qemu-devel] [PULL 07/15] crypto: Make errp the last parameter of functions, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 10/15] nfs: Make errp the last parameter of nfs_client_open, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 04/15] socket: Make errp the last parameter of unix_connect_saddr, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 08/15] mirror: Make errp the last parameter of mirror_start_job, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 05/15] socket: Make errp the last parameter of vsock_connect_saddr, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 14/15] qga: Make errp the last parameter of qga_vss_fsfreeze, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 11/15] fdc: Make errp the last parameter of fdctrl_connect_drives, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 09/15] block: Make errp the last parameter of commit_active_start, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 03/15] socket: Make errp the last parameter of inet_connect_saddr, Markus Armbruster, 2017/04/24
- [Qemu-devel] [PULL 06/15] block: Make errp the last parameter of bdrv_img_create, Markus Armbruster, 2017/04/24