Since qemuAssignDeviceDiskAlias checks whether the input info.alias
is already present, no need to check here as well.
Signed-off-by: John Ferlan <jferlan(a)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 51a7a68f84..9fbb3a0712 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -4447,10 +4447,8 @@ qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver,
goto cleanup;
}
- if (!detach->info.alias) {
- if (qemuAssignDeviceDiskAlias(vm->def, detach, priv->qemuCaps) < 0)
- goto cleanup;
- }
+ if (qemuAssignDeviceDiskAlias(vm->def, detach, priv->qemuCaps) < 0)
+ goto cleanup;
qemuDomainMarkDeviceForRemoval(vm, &detach->info);
--
2.13.6