aboutsummaryrefslogtreecommitdiff
path: root/hw/char/serial-pci-multi.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char/serial-pci-multi.c')
-rw-r--r--hw/char/serial-pci-multi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/char/serial-pci-multi.c b/hw/char/serial-pci-multi.c
index 56f915e7c9..2cf3e44177 100644
--- a/hw/char/serial-pci-multi.c
+++ b/hw/char/serial-pci-multi.c
@@ -95,7 +95,6 @@ static void multi_serial_pci_realize(PCIDevice *dev, Error **errp)
PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev);
PCIMultiSerialState *pci = DO_UPCAST(PCIMultiSerialState, dev, dev);
SerialState *s;
- Error *err = NULL;
size_t i, nports = multi_serial_get_port_count(pc);
pci->dev.config[PCI_CLASS_PROG] = pci->prog_if;
@@ -106,9 +105,7 @@ static void multi_serial_pci_realize(PCIDevice *dev, Error **errp)
for (i = 0; i < nports; i++) {
s = pci->state + i;
- qdev_realize(DEVICE(s), NULL, &err);
- if (err != NULL) {
- error_propagate(errp, err);
+ if (!qdev_realize(DEVICE(s), NULL, errp)) {
multi_serial_pci_exit(dev);
return;
}