From: Peter Krempa Date: Wed, 22 Aug 2018 11:07:21 +0000 (+0200) Subject: qemu: hotplug: Don't generate alias when detaching controllers X-Git-Tag: v4.7.0-rc1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c86735e2d85bf0e7ce8e08ce0b24d5627020ab0e;p=thirdparty%2Flibvirt.git qemu: hotplug: Don't generate alias when detaching controllers 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 Reviewed-by: John Ferlan --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index bd1942efe7..1a9a9e1a32 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -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);