* [PATCH] iommu/rockchip: Don't feed NULL res pointers to devres
@ 2016-03-21 11:00 Tomeu Vizoso
2016-03-21 12:38 ` Javier Martinez Canillas
2016-04-05 14:27 ` Joerg Roedel
0 siblings, 2 replies; 3+ messages in thread
From: Tomeu Vizoso @ 2016-03-21 11:00 UTC (permalink / raw)
To: linux-arm-kernel
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] 3+ messages in thread
* [PATCH] iommu/rockchip: Don't feed NULL res pointers to devres
2016-03-21 11:00 [PATCH] iommu/rockchip: Don't feed NULL res pointers to devres Tomeu Vizoso
@ 2016-03-21 12:38 ` Javier Martinez Canillas
2016-04-05 14:27 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2016-03-21 12:38 UTC (permalink / raw)
To: linux-arm-kernel
Hello Tomeu,
On Mon, Mar 21, 2016 at 8:00 AM, Tomeu Vizoso
<tomeu.vizoso@collabora.com> wrote:
> If we do, devres prints a "invalid resource" string in the error
> loglevel.
>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> ---
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Best regards,
Javier
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] iommu/rockchip: Don't feed NULL res pointers to devres
2016-03-21 11:00 [PATCH] iommu/rockchip: Don't feed NULL res pointers to devres Tomeu Vizoso
2016-03-21 12:38 ` Javier Martinez Canillas
@ 2016-04-05 14:27 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2016-04-05 14:27 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Mar 21, 2016 at 12:00:23PM +0100, Tomeu Vizoso wrote:
> 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(+)
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-05 14:27 UTC | newest]
Thread overview: 3+ 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 12:38 ` Javier Martinez Canillas
2016-04-05 14:27 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).