firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available()
authorGuru Das Srinagesh <quic_gurus@quicinc.com>
Mon, 11 Oct 2021 20:00:14 +0000 (13:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:55 +0000 (19:16 +0100)
commitdf84a4f710451fd43be2c21f1fdfa68adb264558
tree1a0a32fea258cec07f08afd622c3bd0d0ae9ad36
parent58d68f2a2ca124adcd614a8d0eb0b3c8e7ab7866
firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available()

[ Upstream commit 38212b2a8a6fc4c3a6fa99d7445b833bedc9a67c ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/qcom_scm.c