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 <nichen@iscas.ac.cn>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240103085058.3771653-1-nichen@iscas.ac.cn
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Chen Ni 2024-01-03 08:50:58 +00:00 committed by Linus Walleij
parent 6613476e22
commit 2248bee3ea

View File

@ -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)