aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-09-14 14:35:02 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2020-10-09 10:15:06 +1100
commit451c6905899da0cdcd23bffef93504f93fd48d5e (patch)
tree3618e54756735c25635e503fb5b06475097ec7e6 /hw/ppc/spapr.c
parenta5af92e2e9377f753d3df6b2e050b3db6f64fb7d (diff)
downloadqemu-451c6905899da0cdcd23bffef93504f93fd48d5e.zip
qemu-451c6905899da0cdcd23bffef93504f93fd48d5e.tar.gz
qemu-451c6905899da0cdcd23bffef93504f93fd48d5e.tar.bz2
spapr: Add a return value to spapr_nvdimm_validate()
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-13-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 c6af456..7f3a620 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3478,9 +3478,7 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
}
if (is_nvdimm) {
- spapr_nvdimm_validate(hotplug_dev, NVDIMM(dev), size, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ if (!spapr_nvdimm_validate(hotplug_dev, NVDIMM(dev), size, errp)) {
return;
}
} else if (size % SPAPR_MEMORY_BLOCK_SIZE) {