aboutsummaryrefslogtreecommitdiff
path: root/hw/net
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-07-07 18:06:05 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-10 15:18:08 +0200
commita5f9b9df252d0dfb407178ef4c3769f78a64b2ff (patch)
tree3332a93b91cc71e15b74b9cb566451397c1ff387 /hw/net
parent992861fb1e4cf410f30ec8f05bd2dc2a14a5a027 (diff)
downloadqemu-a5f9b9df252d0dfb407178ef4c3769f78a64b2ff.zip
qemu-a5f9b9df252d0dfb407178ef4c3769f78a64b2ff.tar.gz
qemu-a5f9b9df252d0dfb407178ef4c3769f78a64b2ff.tar.bz2
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>
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/virtio-net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 48b07eb..10cc958 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -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) {