Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH] iommu/msm: Return -ENOMEM on memory allocation failure in probe
@ 2026-07-01 22:24 Vladimir Zapolskiy
  2026-07-02  8:46 ` Konrad Dybcio
  2026-07-02 12:46 ` Dmitry Baryshkov
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Zapolskiy @ 2026-07-01 22:24 UTC (permalink / raw)
  To: Rob Clark, Joerg Roedel
  Cc: Will Deacon, Robin Murphy, Sricharan Ramabadhran, iommu,
	linux-arm-msm

If dynamic memory allocation in driver's probe function execution fails,
it should be reported to the driver's framework with -ENOMEM error code.

Fixes: 109bd48ea2e1 ("iommu/msm: Add DT adaptation")
Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
---
 drivers/iommu/msm_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c
index 0ad5ff431d5b..708baeb29c03 100644
--- a/drivers/iommu/msm_iommu.c
+++ b/drivers/iommu/msm_iommu.c
@@ -720,7 +720,7 @@ static int msm_iommu_probe(struct platform_device *pdev)
 
 	iommu = devm_kzalloc(&pdev->dev, sizeof(*iommu), GFP_KERNEL);
 	if (!iommu)
-		return -ENODEV;
+		return -ENOMEM;
 
 	iommu->dev = &pdev->dev;
 	INIT_LIST_HEAD(&iommu->ctx_list);
-- 
2.51.0


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

* Re: [PATCH] iommu/msm: Return -ENOMEM on memory allocation failure in probe
  2026-07-01 22:24 [PATCH] iommu/msm: Return -ENOMEM on memory allocation failure in probe Vladimir Zapolskiy
@ 2026-07-02  8:46 ` Konrad Dybcio
  2026-07-02 12:46 ` Dmitry Baryshkov
  1 sibling, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2026-07-02  8:46 UTC (permalink / raw)
  To: Vladimir Zapolskiy, Rob Clark, Joerg Roedel
  Cc: Will Deacon, Robin Murphy, Sricharan Ramabadhran, iommu,
	linux-arm-msm

On 7/2/26 12:24 AM, Vladimir Zapolskiy wrote:
> If dynamic memory allocation in driver's probe function execution fails,
> it should be reported to the driver's framework with -ENOMEM error code.
> 
> Fixes: 109bd48ea2e1 ("iommu/msm: Add DT adaptation")
> Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH] iommu/msm: Return -ENOMEM on memory allocation failure in probe
  2026-07-01 22:24 [PATCH] iommu/msm: Return -ENOMEM on memory allocation failure in probe Vladimir Zapolskiy
  2026-07-02  8:46 ` Konrad Dybcio
@ 2026-07-02 12:46 ` Dmitry Baryshkov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2026-07-02 12:46 UTC (permalink / raw)
  To: Vladimir Zapolskiy
  Cc: Rob Clark, Joerg Roedel, Will Deacon, Robin Murphy,
	Sricharan Ramabadhran, iommu, linux-arm-msm

On Thu, Jul 02, 2026 at 01:24:11AM +0300, Vladimir Zapolskiy wrote:
> If dynamic memory allocation in driver's probe function execution fails,
> it should be reported to the driver's framework with -ENOMEM error code.
> 
> Fixes: 109bd48ea2e1 ("iommu/msm: Add DT adaptation")
> Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
> ---
>  drivers/iommu/msm_iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2026-07-02 12:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 22:24 [PATCH] iommu/msm: Return -ENOMEM on memory allocation failure in probe Vladimir Zapolskiy
2026-07-02  8:46 ` Konrad Dybcio
2026-07-02 12:46 ` Dmitry Baryshkov

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