summary refs log tree commit diff stats
path: root/hw/cpu/realview_mpcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/cpu/realview_mpcore.c')
-rw-r--r--hw/cpu/realview_mpcore.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/hw/cpu/realview_mpcore.c b/hw/cpu/realview_mpcore.c
index d2e426fa45..96f4d2517a 100644
--- a/hw/cpu/realview_mpcore.c
+++ b/hw/cpu/realview_mpcore.c
@@ -65,14 +65,11 @@ static void realview_mpcore_realize(DeviceState *dev, Error **errp)
     DeviceState *priv = DEVICE(&s->priv);
     DeviceState *gic;
     SysBusDevice *gicbusdev;
-    Error *err = NULL;
     int n;
     int i;
 
     qdev_prop_set_uint32(priv, "num-cpu", s->num_cpu);
-    sysbus_realize(SYS_BUS_DEVICE(&s->priv), &err);
-    if (err != NULL) {
-        error_propagate(errp, err);
+    if (!sysbus_realize(SYS_BUS_DEVICE(&s->priv), errp)) {
         return;
     }
     sysbus_pass_irq(sbd, SYS_BUS_DEVICE(&s->priv));
@@ -81,9 +78,7 @@ static void realview_mpcore_realize(DeviceState *dev, Error **errp)
     }
     /* ??? IRQ routing is hardcoded to "normal" mode.  */
     for (n = 0; n < 4; n++) {
-        sysbus_realize(SYS_BUS_DEVICE(&s->gic[n]), &err);
-        if (err != NULL) {
-            error_propagate(errp, err);
+        if (!sysbus_realize(SYS_BUS_DEVICE(&s->gic[n]), errp)) {
             return;
         }
         gic = DEVICE(&s->gic[n]);