firmware: arm_scmi: Fix return error code in smc_send_message
SMCCC can return NOT_SUPPORTED(-1). Map it to appropriate Linux error codes namely -EOPNOTSUPP. Link: https://lore.kernel.org/r/20200417103232.6896-1-sudeep.holla@arm.com Reported-and-Tested-by:: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
This commit is contained in:
parent
c5bceb98ce
commit
f7199cf489
|
@ -114,7 +114,10 @@ static int smc_send_message(struct scmi_chan_info *cinfo,
|
|||
|
||||
mutex_unlock(&scmi_info->shmem_lock);
|
||||
|
||||
return res.a0;
|
||||
/* Only SMCCC_RET_NOT_SUPPORTED is valid error code */
|
||||
if (res.a0)
|
||||
return -EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void smc_fetch_response(struct scmi_chan_info *cinfo,
|
||||
|
|
Loading…
Reference in New Issue