mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
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>
This commit is contained in:
parent
621ff94d50
commit
6b62d96137
6 changed files with 41 additions and 36 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue