diff options
Diffstat (limited to 'hw/intc')
-rw-r--r-- | hw/intc/xive.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/hw/intc/xive.c b/hw/intc/xive.c index 3459165..9a16243 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) |