aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-09-14 14:35:03 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2020-10-09 10:15:06 +1100
commit35dce34fbc1cfa6a26f95b83f3a8949a4150412f (patch)
tree5388865a7f6c69998a54b2b5bfdedca2f40de79d /hw/ppc/spapr.c
parent451c6905899da0cdcd23bffef93504f93fd48d5e (diff)
spapr: Add a return value to spapr_check_pagesize()
As recommended in "qapi/error.h", return true on success and false on failure. This allows to reduce error propagation overhead in the callers. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <20200914123505.612812-14-groug@kaod.org> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r--hw/ppc/spapr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 7f3a620d41..4256794f3b 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3490,9 +3490,7 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
memdev = object_property_get_link(OBJECT(dimm), PC_DIMM_MEMDEV_PROP,
&error_abort);
pagesize = host_memory_backend_pagesize(MEMORY_BACKEND(memdev));
- spapr_check_pagesize(spapr, pagesize, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ if (!spapr_check_pagesize(spapr, pagesize, errp)) {
return;
}