diff options
author | Sergey Shtylyov <s.shtylyov@omp.ru> | 2023-11-15 23:34:53 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-11-24 11:22:11 +0100 |
commit | 5a002bf206508169dd9d8c002d6326e51f53b42c (patch) | |
tree | 2d1e27da7b6ed953b5e5bae7c37344ae0d567ecf | |
parent | 901b277eafbd98ad327525de6c9bf3cc6abd6370 (diff) |
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>
-rw-r--r-- | drivers/pinctrl/stm32/pinctrl-stm32.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index 64e8201c7eac..2f2b777fcf4f 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -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); } |