[libvirt] [PATCH 02/12] qemuDomainAttachControllerDevice: remove dead code

Ján Tomko jtomko at redhat.com
Tue Oct 17 15:04:34 UTC 2017


After a successful attach, the device address has already been set.
Remove the pointless assignment.
---
 src/qemu/qemu_hotplug.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 0288986d8..2d13c2891 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)
-- 
2.13.0




More information about the libvir-list mailing list