diff mbox series

pinctrl: st: Return pinctrl_gpio_direction_output to transfer the error

Message ID 20240103085058.3771653-1-nichen@iscas.ac.cn
State Accepted
Commit 2248bee3ea38f4a16a7afbf34b5e8196792299c1
Headers show
Series pinctrl: st: Return pinctrl_gpio_direction_output to transfer the error | expand

Commit Message

Chen Ni Jan. 3, 2024, 8:50 a.m. UTC
Return pinctrl_gpio_direction_output() in order to transfer the error
if it fails.

Fixes: b679d6c06b2b ("treewide: rename pinctrl_gpio_direction_output_new()")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/pinctrl/pinctrl-st.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Linus Walleij Jan. 27, 2024, 10:45 p.m. UTC | #1
On Wed, Jan 3, 2024 at 9:47 AM Chen Ni <nichen@iscas.ac.cn> wrote:

> Return pinctrl_gpio_direction_output() in order to transfer the error
> if it fails.
>
> Fixes: b679d6c06b2b ("treewide: rename pinctrl_gpio_direction_output_new()")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Patch applied.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index 1485573b523c..5d9abd6547d0 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)