From: Gabor Juhos Date: Wed, 14 May 2025 19:18:34 +0000 (+0200) Subject: pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output() X-Git-Tag: v6.16-rc1~113^2~6^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0396a8731efd17aec4719ad9981fefeaa13ffa56;p=thirdparty%2Flinux.git 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 Reviewed-by: Andrew Lunn Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-3-07e9ac1ab737@gmail.com Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c index 79f9c08e5039c..8d93d36af63ab 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(®, &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)