This just allow spapr_dr_connector_new() to propagate errors to its callers. It doesn't change any functionality.
Signed-off-by: Greg Kurz <gr...@kaod.org> --- hw/ppc/spapr.c | 4 ++-- hw/ppc/spapr_drc.c | 4 ++-- hw/ppc/spapr_pci.c | 2 +- include/hw/ppc/spapr_drc.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f7a19720dcdf..2bc3dbc25653 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2023,7 +2023,7 @@ static void spapr_create_lmb_dr_connectors(sPAPRMachineState *spapr) addr = i * lmb_size + spapr->hotplug_memory.base; spapr_dr_connector_new(OBJECT(spapr), TYPE_SPAPR_DRC_LMB, - addr / lmb_size); + addr / lmb_size, NULL); } } @@ -2118,7 +2118,7 @@ static void spapr_init_cpus(sPAPRMachineState *spapr) if (mc->has_hotpluggable_cpus) { spapr_dr_connector_new(OBJECT(spapr), TYPE_SPAPR_DRC_CPU, - (core_id / smp_threads) * smt); + (core_id / smp_threads) * smt, NULL); } if (i < boot_cores_nr) { diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 5260b5d363a0..061fff41654a 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -532,7 +532,7 @@ static void unrealize(DeviceState *d, Error **errp) } sPAPRDRConnector *spapr_dr_connector_new(Object *owner, const char *type, - uint32_t id) + uint32_t id, Error **errp) { sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(object_new(type)); char *prop_name; @@ -542,7 +542,7 @@ sPAPRDRConnector *spapr_dr_connector_new(Object *owner, const char *type, 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_set_bool(OBJECT(drc), true, "realized", NULL); + object_property_set_bool(OBJECT(drc), true, "realized", errp); g_free(prop_name); return drc; diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index d84abf1070a0..4b7882e3613d 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1733,7 +1733,7 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp) if (sphb->dr_enabled) { for (i = 0; i < PCI_SLOT_MAX * 8; i++) { spapr_dr_connector_new(OBJECT(phb), TYPE_SPAPR_DRC_PCI, - (sphb->index << 16) | i); + (sphb->index << 16) | i, NULL); } } diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h index a7958d0a8d14..8651af2ffae0 100644 --- a/include/hw/ppc/spapr_drc.h +++ b/include/hw/ppc/spapr_drc.h @@ -248,7 +248,7 @@ uint32_t spapr_drc_index(sPAPRDRConnector *drc); sPAPRDRConnectorType spapr_drc_type(sPAPRDRConnector *drc); sPAPRDRConnector *spapr_dr_connector_new(Object *owner, const char *type, - uint32_t id); + uint32_t id, Error **errp); sPAPRDRConnector *spapr_drc_by_index(uint32_t index); sPAPRDRConnector *spapr_drc_by_id(const char *type, uint32_t id); int spapr_drc_populate_dt(void *fdt, int fdt_offset, Object *owner,