Skip to content

Commit

Permalink
drivers/pinctrl: don't check resource with devm_ioremap_resource
Browse files Browse the repository at this point in the history
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: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Wolfram Sang authored and Linus Walleij committed Jun 16, 2013
1 parent dbf850c commit f50b9e1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/pinctrl/pinctrl-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,12 +1543,6 @@ static int at91_gpio_probe(struct platform_device *pdev)
goto err;
}

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
ret = -ENOENT;
goto err;
}

irq = platform_get_irq(pdev, 0);
if (irq < 0) {
ret = irq;
Expand All @@ -1561,6 +1555,7 @@ static int at91_gpio_probe(struct platform_device *pdev)
goto err;
}

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
at91_chip->regbase = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(at91_chip->regbase)) {
ret = PTR_ERR(at91_chip->regbase);
Expand Down

0 comments on commit f50b9e1

Please sign in to comment.