diff options
Diffstat (limited to 'hw/char/serial.c')
-rw-r--r-- | hw/char/serial.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/hw/char/serial.c b/hw/char/serial.c index 9eebcb27e7..2386479492 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -989,11 +989,8 @@ static void serial_io_realize(DeviceState *dev, Error **errp) { SerialIO *sio = SERIAL_IO(dev); SerialState *s = &sio->serial; - Error *local_err = NULL; - qdev_realize(DEVICE(s), NULL, &local_err); - if (local_err) { - error_propagate(errp, local_err); + if (!qdev_realize(DEVICE(s), NULL, errp)) { return; } @@ -1096,11 +1093,8 @@ static void serial_mm_realize(DeviceState *dev, Error **errp) { SerialMM *smm = SERIAL_MM(dev); SerialState *s = &smm->serial; - Error *local_err = NULL; - qdev_realize(DEVICE(s), NULL, &local_err); - if (local_err) { - error_propagate(errp, local_err); + if (!qdev_realize(DEVICE(s), NULL, errp)) { return; } |