aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/lsi53c895a.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-07-21 12:16:34 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-23 00:37:35 +0200
commitcaad4eb345dc5119d326b8af08452cc0f90f8548 (patch)
tree3f253049cf4d7807579c5a158f801e65fb6e245b /hw/scsi/lsi53c895a.c
parent22d6aa03fd87ba5f219d26bc1810646d0f95842a (diff)
scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline()
Let scsi_bus_legacy_add_drive() and scsi_bus_legacy_handle_cmdline() return an Error**. Prepare qdev initfns for QOM realize error model. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/scsi/lsi53c895a.c')
-rw-r--r--hw/scsi/lsi53c895a.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index e11224fe88..776e31abbe 100644
--- a/hw/scsi/lsi53c895a.c
+++ b/hw/scsi/lsi53c895a.c
@@ -2096,6 +2096,7 @@ static int lsi_scsi_init(PCIDevice *dev)
LSIState *s = LSI53C895A(dev);
DeviceState *d = DEVICE(dev);
uint8_t *pci_conf;
+ Error *err = NULL;
pci_conf = dev->config;
@@ -2118,7 +2119,11 @@ static int lsi_scsi_init(PCIDevice *dev)
scsi_bus_new(&s->bus, d, &lsi_scsi_info, NULL);
if (!d->hotplugged) {
- return scsi_bus_legacy_handle_cmdline(&s->bus);
+ scsi_bus_legacy_handle_cmdline(&s->bus, &err);
+ if (err != NULL) {
+ error_free(err);
+ return -1;
+ }
}
return 0;
}