pinctrl: stm32: return errors from stm32_gpio_direction_output()
Subsystems (4)
PATCH 1/1 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.
---
The patch is against the 'devel' branch of Linus W.'s 'linux-pinctrl.git' repo.
drivers/pinctrl/stm32/pinctrl-stm32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pinctrl/stm32/pinctrl-stm32.c +1 -2
@@ -240,9 +240,8 @@ static int stm32_gpio_direction_output(sstruct 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); }
Quoted 8 lines · Sergey Shtylyov
In the STMicroelectronics STM32 driver,
stm32_gpio_direction_output()ignores the result ofpinctrl_gpio_direction_output()for no good reason. Let's propagate errors frompinctrl_gpio_direction_output()upstream...Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool.
Signed-off-by Sergey Shtylyov <[email protected]>
Patch applied!
Yours,
Linus Walleij