All of lore.kernel.org
 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
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ 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] 4+ messages in thread

end of thread, other threads:[~2026-07-09  8:18 UTC | newest]

Thread overview: 4+ 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
2026-07-09  8:18 ` Joerg Roedel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.