]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
firmware: qcom: scm: Ensure 'a0' status code is treated as signed
authorWill Deacon <will@kernel.org>
Mon, 4 Nov 2019 15:58:15 +0000 (15:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 19:08:33 +0000 (20:08 +0100)
commit496c44d56744db7e58e985f27d511a0045d31552
tree6d718db080ca082874e86158b93c09748cc67afc
parentea46b9e9aa340496aec70ff401b4e922df54f244
firmware: qcom: scm: Ensure 'a0' status code is treated as signed

commit ff34f3cce278a0982a7b66b1afaed6295141b1fc upstream.

The 'a0' member of 'struct arm_smccc_res' is declared as 'unsigned long',
however the Qualcomm SCM firmware interface driver expects to receive
negative error codes via this field, so ensure that it's cast to 'long'
before comparing to see if it is less than 0.

Cc: <stable@vger.kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/qcom_scm-64.c