Skip to content

Commit 55e4d4b

Browse files
committed
firmware: qcom: scm: preserve assign_mem() error return value
JIRA: https://issues.redhat.com/browse/RHEL-117514 commit 121fcf3 Author: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> Date: Thu Aug 7 18:14:51 2025 +0530 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> Signed-off-by: Eric Chanudet <echanude@redhat.com>
1 parent 7e38d96 commit 55e4d4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/qcom/qcom_scm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz,
11191119
if (ret) {
11201120
dev_err(__scm->dev,
11211121
"Assign memory protection call failed %d\n", ret);
1122-
return -EINVAL;
1122+
return ret;
11231123
}
11241124

11251125
*srcvm = next_vm;

0 commit comments

Comments
 (0)