diff options
Diffstat (limited to 'hw/cpu/a9mpcore.c')
-rw-r--r-- | hw/cpu/a9mpcore.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/hw/cpu/a9mpcore.c b/hw/cpu/a9mpcore.c index 642363d..fc35dcf 100644 --- a/hw/cpu/a9mpcore.c +++ b/hw/cpu/a9mpcore.c @@ -57,8 +57,7 @@ static void a9mp_priv_realize(DeviceState *dev, Error **errp) scudev = DEVICE(&s->scu); qdev_prop_set_uint32(scudev, "num-cpu", s->num_cpu); - sysbus_realize(SYS_BUS_DEVICE(&s->scu), &err); - if (err != NULL) { + if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), &err)) { error_propagate(errp, err); return; } @@ -78,8 +77,7 @@ static void a9mp_priv_realize(DeviceState *dev, Error **errp) object_property_get_bool(cpuobj, "has_el3", &error_abort); qdev_prop_set_bit(gicdev, "has-security-extensions", has_el3); - sysbus_realize(SYS_BUS_DEVICE(&s->gic), &err); - if (err != NULL) { + if (!sysbus_realize(SYS_BUS_DEVICE(&s->gic), &err)) { error_propagate(errp, err); return; } @@ -93,8 +91,7 @@ static void a9mp_priv_realize(DeviceState *dev, Error **errp) gtimerdev = DEVICE(&s->gtimer); qdev_prop_set_uint32(gtimerdev, "num-cpu", s->num_cpu); - sysbus_realize(SYS_BUS_DEVICE(&s->gtimer), &err); - if (err != NULL) { + if (!sysbus_realize(SYS_BUS_DEVICE(&s->gtimer), &err)) { error_propagate(errp, err); return; } @@ -102,8 +99,7 @@ static void a9mp_priv_realize(DeviceState *dev, Error **errp) mptimerdev = DEVICE(&s->mptimer); qdev_prop_set_uint32(mptimerdev, "num-cpu", s->num_cpu); - sysbus_realize(SYS_BUS_DEVICE(&s->mptimer), &err); - if (err != NULL) { + if (!sysbus_realize(SYS_BUS_DEVICE(&s->mptimer), &err)) { error_propagate(errp, err); return; } @@ -111,8 +107,7 @@ static void a9mp_priv_realize(DeviceState *dev, Error **errp) wdtdev = DEVICE(&s->wdt); qdev_prop_set_uint32(wdtdev, "num-cpu", s->num_cpu); - sysbus_realize(SYS_BUS_DEVICE(&s->wdt), &err); - if (err != NULL) { + if (!sysbus_realize(SYS_BUS_DEVICE(&s->wdt), &err)) { error_propagate(errp, err); return; } |