summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorGuru Das Srinagesh <quic_gurus@quicinc.com>2021-10-11 13:00:14 -0700
committerBjorn Andersson <bjorn.andersson@linaro.org>2021-10-23 22:12:18 -0500
commit38212b2a8a6fc4c3a6fa99d7445b833bedc9a67c (patch)
treee4ab56ce45dd6bc1542cfdcab84d476773f0d779 /drivers/firmware
parent85f755083b23b1ee59c96df80f148e6203bb078f (diff)
firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available()
Since __qcom_scm_is_call_available() returns bool, have it return false instead of -EINVAL if an invalid SMC convention is detected. This fixes the Smatch static checker warning: drivers/firmware/qcom_scm.c:255 __qcom_scm_is_call_available() warn: signedness bug returning '(-22)' Fixes: 9d11af8b06a8 ("firmware: qcom_scm: Make __qcom_scm_is_call_available() return bool") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/1633982414-28347-1-git-send-email-quic_gurus@quicinc.com
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/qcom_scm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
index a861033616ee..7db8066b19fd 100644
--- a/drivers/firmware/qcom_scm.c
+++ b/drivers/firmware/qcom_scm.c
@@ -252,7 +252,7 @@ static bool __qcom_scm_is_call_available(struct device *dev, u32 svc_id,
break;
default:
pr_err("Unknown SMC convention being used\n");
- return -EINVAL;
+ return false;
}
ret = qcom_scm_call(dev, &desc, &res);