summaryrefslogtreecommitdiffstats
path: root/hw/intc/xive.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/intc/xive.c')
-rw-r--r--hw/intc/xive.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index 2c30dc53d8..9a162431e0 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -757,25 +757,18 @@ 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);
object_property_add_child(cpu, TYPE_XIVE_TCTX, obj);
object_unref(obj);
- object_property_set_link(obj, cpu, "cpu", &error_abort);
- object_property_set_link(obj, OBJECT(xptr), "presenter", &error_abort);
- qdev_realize(DEVICE(obj), NULL, &local_err);
- if (local_err) {
- goto error;
+ 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, 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)