Skip to content
Commit b5f38f09 authored by Vaibhav Jain's avatar Vaibhav Jain Committed by Dan Williams
Browse files

powerpc/papr_scm: Improve error logging and handling papr_scm_ndctl()



Since papr_scm_ndctl() can be called from outside papr_scm, its
exposed to the possibility of receiving NULL as value of 'cmd_rc'
argument. This patch updates papr_scm_ndctl() to protect against such
possibility by assigning it pointer to a local variable in case cmd_rc
== NULL.

Finally the patch also updates the 'default' add a debug log unknown
'cmd' values.

Signed-off-by: default avatarVaibhav Jain <vaibhav@linux.ibm.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20200615124407.32596-5-vaibhav@linux.ibm.com


Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent b791abf3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment