diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2018-10-05 21:42:05 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-10-10 11:56:21 +0200 |
commit | 5fd8d05191e6bca88b6d6d016757c30bded9fe61 (patch) | |
tree | b36f31d0cd2b85bf05d120ad02bf710643f8ae87 /drivers/pinctrl | |
parent | Merge tag 'sh-pfc-for-v4.20-tag3' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
download | linux-5fd8d05191e6bca88b6d6d016757c30bded9fe61.tar.xz linux-5fd8d05191e6bca88b6d6d016757c30bded9fe61.zip |
pinctrl: rza1: don't manually release devm managed resources
If the probe function fails the driver core cares to return the allocated
resources automatically. So the driver can be simplified accordingly.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-rza1.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c index 8d47bcd670a2..14eb576c04a2 100644 --- a/drivers/pinctrl/pinctrl-rza1.c +++ b/drivers/pinctrl/pinctrl-rza1.c @@ -1284,7 +1284,7 @@ static int rza1_gpio_register(struct rza1_pinctrl *rza1_pctl) ret = rza1_parse_gpiochip(rza1_pctl, child, &gpio_chips[i], &gpio_ranges[i]); if (ret) - goto gpiochip_remove; + return ret; ++i; } @@ -1292,12 +1292,6 @@ static int rza1_gpio_register(struct rza1_pinctrl *rza1_pctl) dev_info(rza1_pctl->dev, "Registered %u gpio controllers\n", i); return 0; - -gpiochip_remove: - for (; i > 0; i--) - devm_gpiochip_remove(rza1_pctl->dev, &gpio_chips[i - 1]); - - return ret; } /** |