mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
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>
This commit is contained in:
parent
a5af92e2e9
commit
451c690589
3 changed files with 10 additions and 10 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue