summaryrefslogtreecommitdiffstats
path: root/hw/misc/macio/pmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/macio/pmu.c')
-rw-r--r--hw/misc/macio/pmu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c
index 598d8e7517..42ba963d8c 100644
--- a/hw/misc/macio/pmu.c
+++ b/hw/misc/macio/pmu.c
@@ -740,8 +740,7 @@ static void pmu_realize(DeviceState *dev, Error **errp)
ADBBusState *adb_bus = &s->adb_bus;
struct tm tm;
- sysbus_realize(SYS_BUS_DEVICE(&s->mos6522_pmu), &err);
- if (err) {
+ if (!sysbus_realize(SYS_BUS_DEVICE(&s->mos6522_pmu), &err)) {
error_propagate(errp, err);
return;
}