aboutsummaryrefslogtreecommitdiff
path: root/hw/net/virtio-net.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/virtio-net.c')
-rw-r--r--hw/net/virtio-net.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 1596cb1..48b07eb 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -3137,9 +3137,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;
- qemu_opt_set_bool(n->primary_device_opts,
- "partially_hotplugged", true, &err);
- if (err) {
+ if (!qemu_opt_set_bool(n->primary_device_opts,
+ "partially_hotplugged", true, &err)) {
goto out;
}
hotplug_ctrl = qdev_get_hotplug_handler(n->primary_dev);