From 3d1c7a9782d19052505aabc8f2c134ccd6f3f3fb Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Wed, 18 Nov 2020 09:37:28 +0100 Subject: failover: qdev_device_add() returns err or dev set Never both. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-8-quintela@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'hw') diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 6ca85627d8..3e82108d42 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 " -- cgit v1.2.3-55-g7522