Since qemuAssignDeviceControllerAlias checks whether the input info.alias is already present, no need to check here as well. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- 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 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list