Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d7f2d84 authored by Tomeu Vizoso's avatar Tomeu Vizoso Committed by Joerg Roedel
Browse files

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: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 9735a227
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;