diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2016-06-13 18:57:57 -0300 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-06-20 16:38:13 +0200 |
commit | 6b62d961373e0327f2af8fb77d6d5d6308864180 (patch) | |
tree | 540a92df500ef4f4056110a80ae309636ec5756e /hw/s390x/s390-virtio-ccw.c | |
parent | 621ff94d5074d88253a5818c6b9c4db718fbfc65 (diff) |
error: Remove unnecessary local_err variables
This patch simplifies code that uses a local_err variable just to
immediately use it for an error_propagate() call.
Coccinelle patch used to perform the changes added to
scripts/coccinelle/remove_local_err.cocci.
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1465855078-19435-3-git-send-email-ehabkost@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Blank line in s390-virtio-ccw.c restored]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/s390x/s390-virtio-ccw.c')
-rw-r--r-- | hw/s390x/s390-virtio-ccw.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index e257ca5ab0..52f079a884 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -180,10 +180,8 @@ static HotplugHandler *s390_get_hotplug_handler(MachineState *machine, static void s390_hot_add_cpu(const int64_t id, Error **errp) { MachineState *machine = MACHINE(qdev_get_machine()); - Error *err = NULL; - s390x_new_cpu(machine->cpu_model, id, &err); - error_propagate(errp, err); + s390x_new_cpu(machine->cpu_model, id, errp); } static void ccw_machine_class_init(ObjectClass *oc, void *data) |