drivers/amba: don't check resource with devm_ioremap_resource
authorWolfram Sang <wsa@the-dreams.de>
Tue, 14 Jan 2014 11:58:53 +0000 (12:58 +0100)
committerStephen Warren <swarren@nvidia.com>
Wed, 5 Feb 2014 16:46:07 +0000 (09:46 -0700)
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>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
drivers/amba/tegra-ahb.c

index 1f44e56cc65d3c0262f4217c0040bd7c82c47569..558a239954e84813bb73de6826416341649d64d3 100644 (file)
@@ -256,8 +256,6 @@ static int tegra_ahb_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res)
-               return -ENODEV;
        ahb->regs = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(ahb->regs))
                return PTR_ERR(ahb->regs);