dw_dmac: don't check resource with devm_ioremap_resource
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 5 Jun 2013 12:26:43 +0000 (15:26 +0300)
committerVinod Koul <vinod.koul@intel.com>
Fri, 5 Jul 2013 06:10:42 +0000 (11:40 +0530)
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dw_dmac.c

index 724083d02b34dc3fa7d1ceb21e63420ef2ec523d..2b65ba614e60a89ebf2bd852152f49b3ec15e48b 100644 (file)
@@ -1667,14 +1667,11 @@ static int dw_probe(struct platform_device *pdev)
        int                     err;
        int                     i;
 
-       io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!io)
-               return -EINVAL;
-
        irq = platform_get_irq(pdev, 0);
        if (irq < 0)
                return irq;
 
+       io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        regs = devm_ioremap_resource(&pdev->dev, io);
        if (IS_ERR(regs))
                return PTR_ERR(regs);