Commit cdf7e616 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Linus Walleij

pinctrl: bcm2835: Handle gpiochip_add_pin_range() errors

gpiochip_add_pin_range() can fail, so better return its error code than
a hard coded '0'.

Fixes: d2b67744 ("pinctrl: bcm2835: implement hook for missing gpio-ranges")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/98c3b5890bb72415145c9fe4e1d974711edae376.1681681402.git.christophe.jaillet@wanadoo.frSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent ac9a7868
...@@ -376,10 +376,8 @@ static int bcm2835_add_pin_ranges_fallback(struct gpio_chip *gc) ...@@ -376,10 +376,8 @@ static int bcm2835_add_pin_ranges_fallback(struct gpio_chip *gc)
if (!pctldev) if (!pctldev)
return 0; return 0;
gpiochip_add_pin_range(gc, pinctrl_dev_get_devname(pctldev), 0, 0, return gpiochip_add_pin_range(gc, pinctrl_dev_get_devname(pctldev), 0, 0,
gc->ngpio); gc->ngpio);
return 0;
} }
static const struct gpio_chip bcm2835_gpio_chip = { static const struct gpio_chip bcm2835_gpio_chip = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment