Commit f7199cf4 authored by Sudeep Holla's avatar Sudeep Holla

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.comReported-and-Tested-by: default avatar: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: default avatarEtienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent c5bceb98
......@@ -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,
......
Markdown is supported
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