drivers/soc/qcom/smem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Fail the driver probe if the region can't be mapped
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
---
drivers/soc/qcom/smem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
index c4c45f15dca4..e91dfc123af2 100644
--- a/drivers/soc/qcom/smem.c
+++ b/drivers/soc/qcom/smem.c
@@ -1215,7 +1215,9 @@ static int qcom_smem_probe(struct platform_device *pdev)
smem->item_count = qcom_smem_get_item_count(smem);
break;
case SMEM_GLOBAL_HEAP_VERSION:
- qcom_smem_map_global(smem, size);
+ ret = qcom_smem_map_global(smem, size);
+ if (ret < 0)
+ return ret;
smem->item_count = SMEM_ITEM_COUNT;
break;
default:
--
2.43.0
On Tue, 09 Dec 2025 08:45:37 +0100, Jorge Ramirez-Ortiz wrote:
> Fail the driver probe if the region can't be mapped
>
>
Applied, thanks!
[1/1] soc: qcom: smem: handle ENOMEM error during probe
commit: 0fe01a7955f4fef97e7cc6d14bfc5931c660402b
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
On Tue, Dec 09, 2025 at 08:45:37AM +0100, Jorge Ramirez-Ortiz wrote:
> Fail the driver probe if the region can't be mapped
>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> ---
> drivers/soc/qcom/smem.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Fixes: 20bb6c9de1b7 ("soc: qcom: smem: map only partitions used by local HOST")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
© 2016 - 2026 Red Hat, Inc.