summary refs log tree commit diff stats
path: root/hw/intc
diff options
context:
space:
mode:
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/xive.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index 34591659d3..9a162431e0 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -757,7 +757,6 @@ static const TypeInfo xive_tctx_info = {
 
 Object *xive_tctx_create(Object *cpu, XivePresenter *xptr, Error **errp)
 {
-    Error *local_err = NULL;
     Object *obj;
 
     obj = object_new(TYPE_XIVE_TCTX);
@@ -765,16 +764,11 @@ Object *xive_tctx_create(Object *cpu, XivePresenter *xptr, Error **errp)
     object_unref(obj);
     object_property_set_link(obj, "cpu", cpu, &error_abort);
     object_property_set_link(obj, "presenter", OBJECT(xptr), &error_abort);
-    if (!qdev_realize(DEVICE(obj), NULL, &local_err)) {
-        goto error;
+    if (!qdev_realize(DEVICE(obj), NULL, errp)) {
+        object_unparent(obj);
+        return NULL;
     }
-
     return obj;
-
-error:
-    object_unparent(obj);
-    error_propagate(errp, local_err);
-    return NULL;
 }
 
 void xive_tctx_destroy(XiveTCTX *tctx)