From: Chen Ni Date: Wed, 3 Jan 2024 08:50:58 +0000 (+0000) Subject: pinctrl: st: Return pinctrl_gpio_direction_output to transfer the error X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2248bee3ea38f4a16a7afbf34b5e8196792299c1;p=linux.git pinctrl: st: Return pinctrl_gpio_direction_output to transfer the error Return pinctrl_gpio_direction_output() in order to transfer the error if it fails. Signed-off-by: Chen Ni Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240103085058.3771653-1-nichen@iscas.ac.cn Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index 1485573b523c2..5d9abd6547d06 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -723,9 +723,8 @@ static int st_gpio_direction_output(struct gpio_chip *chip, struct st_gpio_bank *bank = gpiochip_get_data(chip); __st_gpio_set(bank, offset, value); - pinctrl_gpio_direction_output(chip, offset); - return 0; + return pinctrl_gpio_direction_output(chip, offset); } static int st_gpio_get_direction(struct gpio_chip *chip, unsigned offset)