diff options
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r-- | qdev-monitor.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c index 648b8ac4fa..cefd21b8e6 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -679,8 +679,7 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error **errp) } dev->opts = opts; - qdev_realize(DEVICE(dev), bus, &err); - if (err != NULL) { + if (!qdev_realize(DEVICE(dev), bus, &err)) { dev->opts = NULL; goto err_del_dev; } |