Skip to content

Commit bfa0ff8

Browse files
juhosgLinus Walleij
authored andcommitted
pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()
The armada_37xx_gpio_direction_{in,out}put() functions can fail, so propagate their error values back to the stack instead of silently ignoring those. Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-5-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 57273ff commit bfa0ff8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/pinctrl/mvebu/pinctrl-armada-37xx.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,16 +472,17 @@ static int armada_37xx_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
472472
{
473473
struct armada_37xx_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
474474
struct gpio_chip *chip = range->gc;
475+
int ret;
475476

476477
dev_dbg(info->dev, "gpio_direction for pin %u as %s-%d to %s\n",
477478
offset, range->name, offset, input ? "input" : "output");
478479

479480
if (input)
480-
armada_37xx_gpio_direction_input(chip, offset);
481+
ret = armada_37xx_gpio_direction_input(chip, offset);
481482
else
482-
armada_37xx_gpio_direction_output(chip, offset, 0);
483+
ret = armada_37xx_gpio_direction_output(chip, offset, 0);
483484

484-
return 0;
485+
return ret;
485486
}
486487

487488
static int armada_37xx_gpio_request_enable(struct pinctrl_dev *pctldev,

0 commit comments

Comments
 (0)