aboutsummaryrefslogtreecommitdiff
path: root/hw/lsi53c895a.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-06-25 18:53:21 +0200
committerKevin Wolf <kwolf@redhat.com>2010-07-02 13:18:01 +0200
commitfa66b909f382619da15f8c7e323145adfa94fdac (patch)
treead7e6948ea9eafbd78633a6d14d25cb5c90a88f1 /hw/lsi53c895a.c
parent39508e7adb0de3ef69caa1b494d823d8ac11d3f3 (diff)
scsi: scsi_bus_legacy_handle_cmdline() can fail, fix callers
None of its callers checks for failure. scsi_hot_add() can crash because of that: (qemu) drive_add 4 if=scsi,format=host_device,file=/dev/sg1 scsi-generic: scsi generic interface too old Segmentation fault (core dumped) Fix all callers, not just scsi_hot_add(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/lsi53c895a.c')
-rw-r--r--hw/lsi53c895a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 9a37fed3b3..1bb1caf478 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -2176,7 +2176,7 @@ static int lsi_scsi_init(PCIDevice *dev)
scsi_bus_new(&s->bus, &dev->qdev, 1, LSI_MAX_DEVS, lsi_command_complete);
if (!dev->qdev.hotplugged) {
- scsi_bus_legacy_handle_cmdline(&s->bus);
+ return scsi_bus_legacy_handle_cmdline(&s->bus);
}
return 0;
}