mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: smem: handle ENOMEM error during probe
@ 2025-12-09  7:45 Jorge Ramirez-Ortiz
  2025-12-09  7:54 ` Dmitry Baryshkov
  2025-12-17 23:07 ` Bjorn Andersson
  0 siblings, 2 replies; 3+ messages in thread
From: Jorge Ramirez-Ortiz @ 2025-12-09  7:45 UTC (permalink / raw)
  To: jorge.ramirez, andersson, konradybcio; +Cc: linux-arm-msm, linux-kernel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] soc: qcom: smem: handle ENOMEM error during probe
  2025-12-09  7:45 [PATCH] soc: qcom: smem: handle ENOMEM error during probe Jorge Ramirez-Ortiz
@ 2025-12-09  7:54 ` Dmitry Baryshkov
  2025-12-17 23:07 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2025-12-09  7:54 UTC (permalink / raw)
  To: Jorge Ramirez-Ortiz; +Cc: andersson, konradybcio, linux-arm-msm, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] soc: qcom: smem: handle ENOMEM error during probe
  2025-12-09  7:45 [PATCH] soc: qcom: smem: handle ENOMEM error during probe Jorge Ramirez-Ortiz
  2025-12-09  7:54 ` Dmitry Baryshkov
@ 2025-12-17 23:07 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2025-12-17 23:07 UTC (permalink / raw)
  To: konradybcio, Jorge Ramirez-Ortiz; +Cc: linux-arm-msm, linux-kernel


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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-17 22:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-09  7:45 [PATCH] soc: qcom: smem: handle ENOMEM error during probe Jorge Ramirez-Ortiz
2025-12-09  7:54 ` Dmitry Baryshkov
2025-12-17 23:07 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®