Message ID | 1374602524-3398-9-git-send-email-wsa@the-dreams.de |
---|---|
State | Not Applicable, archived |
Headers | show |
On 07/23/2013 11:01 AM, Wolfram Sang wrote: > devm_ioremap_resource does sanity checks on the given resource. No need to > duplicate this in the driver. > > Signed-off-by: Wolfram Sang <wsa@the-dreams.de> > --- > Please apply via the subsystem-tree. You probably want to Cc the usual commiter (Joerg Roedel <joro@8bytes.org>). I've done so here. -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index f6f120e..e066560 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c @@ -1177,8 +1177,6 @@ static int tegra_smmu_probe(struct platform_device *pdev) struct resource *res; res = platform_get_resource(pdev, IORESOURCE_MEM, i); - if (!res) - return -ENODEV; smmu->regs[i] = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(smmu->regs[i])) return PTR_ERR(smmu->regs[i]);
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> --- Please apply via the subsystem-tree. drivers/iommu/tegra-smmu.c | 2 -- 1 file changed, 2 deletions(-)