diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2016-03-21 07:00:23 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-04-05 10:27:07 -0400 |
commit | 8d7f2d84ed2d44b05e1ce88fa4b74886af46a139 (patch) | |
tree | f7a3e0cae2668900e89c53e341fff0e83bb98146 /drivers/iommu/rockchip-iommu.c | |
parent | 9735a22799b9214d17d3c231fe377fc852f042e9 (diff) |
iommu/rockchip: Don't feed NULL res pointers to devres
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>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/rockchip-iommu.c')
-rw-r--r-- | drivers/iommu/rockchip-iommu.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
1049 | 1049 | ||
1050 | for (i = 0; i < pdev->num_resources; i++) { | 1050 | for (i = 0; i < pdev->num_resources; i++) { |
1051 | res = platform_get_resource(pdev, IORESOURCE_MEM, i); | 1051 | res = platform_get_resource(pdev, IORESOURCE_MEM, i); |
1052 | if (!res) | ||
1053 | continue; | ||
1052 | iommu->bases[i] = devm_ioremap_resource(&pdev->dev, res); | 1054 | iommu->bases[i] = devm_ioremap_resource(&pdev->dev, res); |
1053 | if (IS_ERR(iommu->bases[i])) | 1055 | if (IS_ERR(iommu->bases[i])) |
1054 | continue; | 1056 | continue; |