summaryrefslogtreecommitdiffstats
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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/char/serial-pci-multi.c b/hw/char/serial-pci-multi.c
index 56f915e7c9..1328967461 100644
--- a/hw/char/serial-pci-multi.c
+++ b/hw/char/serial-pci-multi.c
@@ -106,8 +106,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) {
+ if (!qdev_realize(DEVICE(s), NULL, &err)) {
error_propagate(errp, err);
multi_serial_pci_exit(dev);
return;