Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firmware: qcom: scm: preserve assign_mem() error return value

When qcom_scm_assign_mem() fails, the error value is currently being
overwritten after it is logged, resulting in the loss of the original
error code. Fix this by retaining and returning the original error value
as intended.

Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250807124451.2623019-1-mukesh.ojha@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Mukesh Ojha and committed by
Bjorn Andersson
121fcf3c 8f5ae30d

+1 -1
+1 -1
drivers/firmware/qcom/qcom_scm.c
··· 1119 1119 if (ret) { 1120 1120 dev_err(__scm->dev, 1121 1121 "Assign memory protection call failed %d\n", ret); 1122 - return -EINVAL; 1122 + return ret; 1123 1123 } 1124 1124 1125 1125 *srcvm = next_vm;