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 <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Peter Krempa 2018-08-22 13:07:21 +02:00
parent d88a87d6c4
commit c86735e2d8

View 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);