drivers/dma: don't check resource with devm_ioremap_resource
authorWolfram Sang <wsa@the-dreams.de>
Sun, 12 May 2013 13:19:47 +0000 (15:19 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 18 May 2013 09:54:55 +0000 (11:54 +0200)
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>
Acked-by: Stephen Warren <swarren@nvidia.com>
drivers/dma/tegra20-apb-dma.c

index ce193409ebd32345e997dad798625c41565b438e..33f59ecd256e1487ce3dca17cd5f0822e2308c34 100644 (file)
@@ -1273,11 +1273,6 @@ static int tegra_dma_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, tdma);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(&pdev->dev, "No mem resource for DMA\n");
-               return -EINVAL;
-       }
-
        tdma->base_addr = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(tdma->base_addr))
                return PTR_ERR(tdma->base_addr);