提交 f7199cf4 编写于 作者: S 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: N: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: NEtienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: NPeng Fan <peng.fan@nxp.com>
Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册