diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a0503148f0573e477a9bbba10836292e20ebf409..64221cf99d75008272f3d2872dad8332b322dad5 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6136,9 +6136,8 @@ qemuDomainDetachDeviceDiskLive(virQEMUDriverPtr driver, case VIR_DOMAIN_DISK_DEVICE_LUN: if (disk->bus == VIR_DOMAIN_DISK_BUS_VIRTIO) ret = qemuDomainDetachPciDiskDevice(driver, vm, dev); - else if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI) - ret = qemuDomainDetachDiskDevice(driver, vm, dev); - else if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_USB) + else if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI || + disk->bus == VIR_DOMAIN_DISK_BUS_USB) ret = qemuDomainDetachDiskDevice(driver, vm, dev); else virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",