drivers/firmware/qcom/qcom_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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>
---
drivers/firmware/qcom/qcom_scm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 26cd0458aacd..5243d5abbbe9 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -1119,7 +1119,7 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz,
if (ret) {
dev_err(__scm->dev,
"Assign memory protection call failed %d\n", ret);
- return -EINVAL;
+ return ret;
}
*srcvm = next_vm;
--
2.50.1
On Thu, 07 Aug 2025 18:14:51 +0530, Mukesh Ojha wrote: > 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. > > Applied, thanks! [1/1] firmware: qcom: scm: preserve assign_mem() error return value commit: 121fcf3c871181edce0708a49d2397cedd6ad21f Best regards, -- Bjorn Andersson <andersson@kernel.org>
On 8/7/25 2:44 PM, Mukesh Ojha wrote: > 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> Konrad
© 2016 - 2025 Red Hat, Inc.