drivers/gpio: 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:55:19 +0000 (11:55 +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/gpio/gpio-mvebu.c
drivers/gpio/gpio-tegra.c

index bf69a7eff370cbabc72ba01591727ba20c81338c..3a4816adc137de912b51fca601c50d65f8baea19 100644 (file)
@@ -619,11 +619,6 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
         * per-CPU registers */
        if (soc_variant == MVEBU_GPIO_SOC_VARIANT_ARMADAXP) {
                res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-               if (!res) {
-                       dev_err(&pdev->dev, "Cannot get memory resource\n");
-                       return -ENODEV;
-               }
-
                mvchip->percpu_membase = devm_ioremap_resource(&pdev->dev,
                                                               res);
                if (IS_ERR(mvchip->percpu_membase))
index da4cb5b0cb87612fed241b9a4ebc6245716377cd..9a62672f1bed97185b26132966dd0ddcb50534f3 100644 (file)
@@ -463,11 +463,6 @@ static int tegra_gpio_probe(struct platform_device *pdev)
        }
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(&pdev->dev, "Missing MEM resource\n");
-               return -ENODEV;
-       }
-
        regs = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(regs))
                return PTR_ERR(regs);