Commit allowing hotplug of CDROMs moved the logic forbidding the hotplug
to the appropriate blocks based on the disk frontend but forgot to
actually bail out on such error.

Fixes: 3078799fef82d45ac10624e3bacded7a285d8a4f
Signed-off-by: Peter Krempa <pkre...@redhat.com>
---
 src/qemu/qemu_hotplug.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 2d55d1d21e..80a39c159f 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -944,6 +944,7 @@ qemuDomainAttachDeviceDiskLiveInternal(virQEMUDriver 
*driver,
         if (disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
             virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
                            _("cdrom device with virtio bus isn't supported"));
+            goto cleanup;
         }
         if (qemuDomainEnsureVirtioAddress(&releaseVirtio, vm, dev) < 0)
             goto cleanup;
-- 
2.42.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-le...@lists.libvirt.org

Reply via email to