aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci-hotplug.c')
-rw-r--r--hw/pci-hotplug.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index f10c868eee..ba13d2bce0 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -199,14 +199,10 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
switch (type) {
case IF_SCSI:
- if (!dinfo) {
- monitor_printf(mon, "scsi requires a backing file/device.\n");
- return NULL;
- }
dev = pci_create(bus, devfn, "lsi53c895a");
if (qdev_init(&dev->qdev) < 0)
dev = NULL;
- if (dev) {
+ if (dev && dinfo) {
if (scsi_hot_add(&dev->qdev, dinfo, 0) != 0) {
qdev_unplug(&dev->qdev);
dev = NULL;