]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: hotplug: Don't generate alias when detaching controllers
authorPeter Krempa <pkrempa@redhat.com>
Wed, 22 Aug 2018 11:07:21 +0000 (13:07 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 22 Aug 2018 11:55:26 +0000 (13:55 +0200)
qemuDomainDetachControllerDevice contained code which implied that alias
might be NULL when detaching the disk and tried to generate it. This is
no longer possible so we can remove the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_hotplug.c

index bd1942efe7dac066e31b1b01883081c0bfc21a73..1a9a9e1a327d20b84c32331cd06126055944c8ee 100644 (file)
@@ -5281,11 +5281,6 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
         goto cleanup;
     }
 
-    if (!detach->info.alias) {
-        if (qemuAssignDeviceControllerAlias(vm->def, priv->qemuCaps, detach) < 0)
-            goto cleanup;
-    }
-
     if (!async)
         qemuDomainMarkDeviceForRemoval(vm, &detach->info);