aboutsummaryrefslogtreecommitdiff
path: root/hw/char/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char/serial.c')
-rw-r--r--hw/char/serial.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 9eebcb2..e69096e 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -991,8 +991,7 @@ static void serial_io_realize(DeviceState *dev, Error **errp)
SerialState *s = &sio->serial;
Error *local_err = NULL;
- qdev_realize(DEVICE(s), NULL, &local_err);
- if (local_err) {
+ if (!qdev_realize(DEVICE(s), NULL, &local_err)) {
error_propagate(errp, local_err);
return;
}
@@ -1098,8 +1097,7 @@ static void serial_mm_realize(DeviceState *dev, Error **errp)
SerialState *s = &smm->serial;
Error *local_err = NULL;
- qdev_realize(DEVICE(s), NULL, &local_err);
- if (local_err) {
+ if (!qdev_realize(DEVICE(s), NULL, &local_err)) {
error_propagate(errp, local_err);
return;
}