From: Ján Tomko Date: Thu, 12 Oct 2017 13:06:56 +0000 (+0200) Subject: qemuDomainAttachControllerDevice: remove dead code X-Git-Tag: v3.9.0-rc1~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7afaaa934bd48daea446ef832d64c1ccd82432c1;p=thirdparty%2Flibvirt.git qemuDomainAttachControllerDevice: remove dead code After a successful attach, the device address has already been set. Remove the pointless assignment. --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 0288986d83..2d13c28913 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -590,11 +590,8 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver, goto cleanup; } - if (ret == 0) { - if (controller->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) - controller->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI; + if (ret == 0) virDomainControllerInsertPreAlloced(vm->def, controller); - } cleanup: if (ret != 0 && releaseaddr)