aboutsummaryrefslogtreecommitdiff
path: root/hw/net
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2020-11-18 09:37:28 +0100
committerMichael S. Tsirkin <mst@redhat.com>2020-12-08 13:48:57 -0500
commit3d1c7a9782d19052505aabc8f2c134ccd6f3f3fb (patch)
treef01ad42307ad5496303b5962c39110c452c7d2ff /hw/net
parent594d308b9314b446ed2ccc42de7b4d57ba1b7118 (diff)
downloadqemu-3d1c7a9782d19052505aabc8f2c134ccd6f3f3fb.zip
qemu-3d1c7a9782d19052505aabc8f2c134ccd6f3f3fb.tar.gz
qemu-3d1c7a9782d19052505aabc8f2c134ccd6f3f3fb.tar.bz2
failover: qdev_device_add() returns err or dev set
Never both. Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <20201118083748.1328-8-quintela@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/virtio-net.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 6ca8562..3e82108 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -803,13 +803,6 @@ static void failover_add_primary(VirtIONet *n, Error **errp)
if (err) {
qemu_opts_del(n->primary_device_opts);
}
- if (n->primary_dev) {
- if (err) {
- qdev_unplug(n->primary_dev, &err);
- qdev_set_id(n->primary_dev, "");
-
- }
- }
} else {
error_setg(errp, "Primary device not found");
error_append_hint(errp, "Virtio-net failover will not work. Make "