aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_drc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ppc/spapr_drc.c')
-rw-r--r--hw/ppc/spapr_drc.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index 0b66d59867..728307a992 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -392,7 +392,7 @@ void spapr_drc_attach(SpaprDrc *drc, DeviceState *d, Error **errp)
object_property_add_link(OBJECT(drc), "device",
object_get_typename(OBJECT(drc->dev)),
(Object **)(&drc->dev),
- NULL, 0, NULL);
+ NULL, 0);
}
static void spapr_drc_release(SpaprDrc *drc)
@@ -519,7 +519,6 @@ static void realize(DeviceState *d, Error **errp)
Object *root_container;
gchar *link_name;
char *child_name;
- Error *err = NULL;
trace_spapr_drc_realize(spapr_drc_index(drc));
/* NOTE: we do this as part of realize/unrealize due to the fact
@@ -534,13 +533,9 @@ static void realize(DeviceState *d, Error **errp)
child_name = object_get_canonical_path_component(OBJECT(drc));
trace_spapr_drc_realize_child(spapr_drc_index(drc), child_name);
object_property_add_alias(root_container, link_name,
- drc->owner, child_name, &err);
+ drc->owner, child_name);
g_free(child_name);
g_free(link_name);
- if (err) {
- error_propagate(errp, err);
- return;
- }
vmstate_register(VMSTATE_IF(drc), spapr_drc_index(drc), &vmstate_spapr_drc,
drc);
trace_spapr_drc_realize_complete(spapr_drc_index(drc));
@@ -570,7 +565,7 @@ SpaprDrc *spapr_dr_connector_new(Object *owner, const char *type,
drc->owner = owner;
prop_name = g_strdup_printf("dr-connector[%"PRIu32"]",
spapr_drc_index(drc));
- object_property_add_child(owner, prop_name, OBJECT(drc), &error_abort);
+ object_property_add_child(owner, prop_name, OBJECT(drc));
object_unref(OBJECT(drc));
object_property_set_bool(OBJECT(drc), true, "realized", NULL);
g_free(prop_name);
@@ -583,12 +578,11 @@ static void spapr_dr_connector_instance_init(Object *obj)
SpaprDrc *drc = SPAPR_DR_CONNECTOR(obj);
SpaprDrcClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
- object_property_add_uint32_ptr(obj, "id", &drc->id, OBJ_PROP_FLAG_READ,
- NULL);
+ object_property_add_uint32_ptr(obj, "id", &drc->id, OBJ_PROP_FLAG_READ);
object_property_add(obj, "index", "uint32", prop_get_index,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL);
object_property_add(obj, "fdt", "struct", prop_get_fdt,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL);
drc->state = drck->empty_state;
}