mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
pinctrl: stm32: return errors from stm32_gpio_direction_output()
In the STMicroelectronics STM32 driver, stm32_gpio_direction_output() ignores the result of pinctrl_gpio_direction_output() for no good reason. Let's propagate errors from pinctrl_gpio_direction_output() upstream... Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool. Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Link: https://lore.kernel.org/r/5ce023a8-db0c-13a9-be42-09e3348ca44d@omp.ru Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
901b277eaf
commit
5a002bf206
@ -240,9 +240,8 @@ static int stm32_gpio_direction_output(struct gpio_chip *chip,
|
||||
struct stm32_gpio_bank *bank = gpiochip_get_data(chip);
|
||||
|
||||
__stm32_gpio_set(bank, offset, value);
|
||||
pinctrl_gpio_direction_output(chip, offset);
|
||||
|
||||
return 0;
|
||||
return pinctrl_gpio_direction_output(chip, offset);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user