diff options
author | Srikar Dronamraju <[email protected]> | 2020-01-29 19:22:57 +0530 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2020-03-04 22:44:30 +1100 |
commit | e7214ae9d85aa325c9f3cb34bf4fad7f112861d7 (patch) | |
tree | a7452c3af7aedf721456c38d9743b306c1cc43c9 | |
parent | a05f0e5be4e81e4977d3f92aaf7688ee0cb7d5db (diff) |
powerpc/vphn: Check for error from hcall_vphn
There is no value in unpacking associativity, if
H_HOME_NODE_ASSOCIATIVITY hcall has returned an error.
Signed-off-by: Srikar Dronamraju <[email protected]>
Reported-by: Abdul Haleem <[email protected]>
Reviewed-by: Nathan Lynch <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | arch/powerpc/platforms/pseries/vphn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/vphn.c b/arch/powerpc/platforms/pseries/vphn.c index 3f07bf6c670e..cca474a2c396 100644 --- a/arch/powerpc/platforms/pseries/vphn.c +++ b/arch/powerpc/platforms/pseries/vphn.c @@ -82,7 +82,8 @@ long hcall_vphn(unsigned long cpu, u64 flags, __be32 *associativity) long retbuf[PLPAR_HCALL9_BUFSIZE] = {0}; rc = plpar_hcall9(H_HOME_NODE_ASSOCIATIVITY, retbuf, flags, cpu); - vphn_unpack_associativity(retbuf, associativity); + if (rc == H_SUCCESS) + vphn_unpack_associativity(retbuf, associativity); return rc; } |