All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu/rockchip: Don't feed NULL res pointers to devres
@ 2016-03-21 11:00 ` Tomeu Vizoso
  0 siblings, 0 replies; 8+ messages in thread
From: Tomeu Vizoso @ 2016-03-21 11:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Tomeu Vizoso, Joerg Roedel, Heiko Stuebner, iommu,
	linux-arm-kernel, linux-rockchip

If we do, devres prints a "invalid resource" string in the error
loglevel.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
 drivers/iommu/rockchip-iommu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index a6f593a0a29e..0253ab35c33b 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -1049,6 +1049,8 @@ static int rk_iommu_probe(struct platform_device *pdev)
 
 	for (i = 0; i < pdev->num_resources; i++) {
 		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
+		if (!res)
+			continue;
 		iommu->bases[i] = devm_ioremap_resource(&pdev->dev, res);
 		if (IS_ERR(iommu->bases[i]))
 			continue;
-- 
2.5.0

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

end of thread, other threads:[~2016-04-05 14:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-21 11:00 [PATCH] iommu/rockchip: Don't feed NULL res pointers to devres Tomeu Vizoso
2016-03-21 11:00 ` Tomeu Vizoso
     [not found] ` <1458558024-6922-1-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2016-03-21 12:38   ` Javier Martinez Canillas
2016-03-21 12:38     ` Javier Martinez Canillas
2016-03-21 12:38     ` Javier Martinez Canillas
2016-04-05 14:27   ` Joerg Roedel
2016-04-05 14:27     ` Joerg Roedel
2016-04-05 14:27     ` 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.