summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Juhos <j4g8y7@gmail.com>2025-05-14 21:18:34 +0200
committerLinus Walleij <linus.walleij@linaro.org>2025-05-15 00:18:14 +0200
commit0396a8731efd17aec4719ad9981fefeaa13ffa56 (patch)
tree3b42073d99d0bd64e9b7c6e8e8abb08b2fe72ff8
parente6ebd4942981f8ad37189bbb36a3c8495e21ef4c (diff)
pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output()
The regmap_update_bits() function can fail, so propagate its error up to the stack instead of silently ignoring that. 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-3-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-37xx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 79f9c08e5039..8d93d36af63a 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -432,9 +432,7 @@ static int armada_37xx_gpio_direction_output(struct gpio_chip *chip,
reg = OUTPUT_EN;
armada_37xx_update_reg(&reg, &en_offset);
- regmap_update_bits(info->regmap, reg, mask, mask);
-
- return 0;
+ return regmap_update_bits(info->regmap, reg, mask, mask);
}
static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset)