summaryrefslogtreecommitdiffstats
path: root/hw/block/fdc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/block/fdc.c')
-rw-r--r--hw/block/fdc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index 3425d56e2a..3be8c7be5b 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -2575,8 +2575,7 @@ static void fdctrl_connect_drives(FDCtrl *fdctrl, DeviceState *fdc_dev,
return;
}
- qdev_realize_and_unref(dev, &fdctrl->bus.bus, &local_err);
- if (local_err) {
+ if (!qdev_realize_and_unref(dev, &fdctrl->bus.bus, &local_err)) {
error_propagate(errp, local_err);
return;
}