error: Reduce unnecessary error propagation

When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away, even when we need to keep error_propagate() for other
error paths.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200707160613.848843-38-armbru@redhat.com>
This commit is contained in:
Markus Armbruster 2020-07-07 18:06:05 +02:00
parent 992861fb1e
commit a5f9b9df25
8 changed files with 13 additions and 14 deletions

View file

@ -3138,8 +3138,8 @@ static bool failover_replug_primary(VirtIONet *n, Error **errp)
qdev_set_parent_bus(n->primary_dev, n->primary_bus);
n->primary_should_be_hidden = false;
if (!qemu_opt_set_bool(n->primary_device_opts,
"partially_hotplugged", true, &err)) {
goto out;
"partially_hotplugged", true, errp)) {
return false;
}
hotplug_ctrl = qdev_get_hotplug_handler(n->primary_dev);
if (hotplug_ctrl) {