Commit 67b544d6 authored by Greg Kurz's avatar Greg Kurz Committed by David Gibson
Browse files

pnv_core: drop reference on ICPState object during CPU realization



Similarly to what was done to spapr with commit 249127d0, this patch
ensures that we don't keep an extra reference on the ICPState object. Also
since the object was just created and not reparented yet, the call to
object_property_add_child() should never fail: let's pass &error_abort to
make this clear.

Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 79808336
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -119,7 +119,8 @@ static void pnv_core_realize_child(Object *child, XICSFabric *xi, Error **errp)
    Object *obj;

    obj = object_new(TYPE_PNV_ICP);
    object_property_add_child(OBJECT(cpu), "icp", obj, NULL);
    object_property_add_child(OBJECT(cpu), "icp", obj, &error_abort);
    object_unref(obj);
    object_property_add_const_link(obj, "xics", OBJECT(xi), &error_abort);
    object_property_set_bool(obj, true, "realized", &local_err);
    if (local_err) {