[libvirt] [PATCH 4/4] qemu: Remove unnecessary controller detach info.alias check

John Ferlan jferlan at redhat.com
Fri Oct 20 12:03:30 UTC 2017


Since qemuAssignDeviceControllerAlias checks whether the input info.alias
is already present, no need to check here as well.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/qemu/qemu_hotplug.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 9fbb3a0712..0415584b55 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -4662,10 +4662,8 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
         goto cleanup;
     }
 
-    if (!detach->info.alias) {
-        if (qemuAssignDeviceControllerAlias(vm->def, priv->qemuCaps, detach) < 0)
-            goto cleanup;
-    }
+    if (qemuAssignDeviceControllerAlias(vm->def, priv->qemuCaps, detach) < 0)
+        goto cleanup;
 
     qemuDomainMarkDeviceForRemoval(vm, &detach->info);
 
-- 
2.13.6




More information about the libvir-list mailing list