mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] reset: gpio: check the return value of gpiod_set_value_cansleep()
@ 2025-12-02 16:39 Bartosz Golaszewski
  2026-01-08 12:02 ` Philipp Zabel
  0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-12-02 16:39 UTC (permalink / raw)
  To: Philipp Zabel, Krzysztof Kozlowski; +Cc: linux-kernel, Bartosz Golaszewski

gpiod_set_value_cansleep() now returns an integer and can indicate
failures. Propagate the return value to the caller of the reset API.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 drivers/reset/reset-gpio.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/reset/reset-gpio.c b/drivers/reset/reset-gpio.c
index e5512b3b596b..fdbd1c0cbe99 100644
--- a/drivers/reset/reset-gpio.c
+++ b/drivers/reset/reset-gpio.c
@@ -22,9 +22,7 @@ static int reset_gpio_assert(struct reset_controller_dev *rc, unsigned long id)
 {
 	struct reset_gpio_priv *priv = rc_to_reset_gpio(rc);
 
-	gpiod_set_value_cansleep(priv->reset, 1);
-
-	return 0;
+	return gpiod_set_value_cansleep(priv->reset, 1);
 }
 
 static int reset_gpio_deassert(struct reset_controller_dev *rc,
@@ -32,9 +30,7 @@ static int reset_gpio_deassert(struct reset_controller_dev *rc,
 {
 	struct reset_gpio_priv *priv = rc_to_reset_gpio(rc);
 
-	gpiod_set_value_cansleep(priv->reset, 0);
-
-	return 0;
+	return gpiod_set_value_cansleep(priv->reset, 0);
 }
 
 static int reset_gpio_status(struct reset_controller_dev *rc, unsigned long id)
-- 
2.51.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] reset: gpio: check the return value of gpiod_set_value_cansleep()
  2025-12-02 16:39 [PATCH] reset: gpio: check the return value of gpiod_set_value_cansleep() Bartosz Golaszewski
@ 2026-01-08 12:02 ` Philipp Zabel
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2026-01-08 12:02 UTC (permalink / raw)
  To: Bartosz Golaszewski, Krzysztof Kozlowski; +Cc: linux-kernel

On Di, 2025-12-02 at 17:39 +0100, Bartosz Golaszewski wrote:
> gpiod_set_value_cansleep() now returns an integer and can indicate
> failures. Propagate the return value to the caller of the reset API.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-08 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-02 16:39 [PATCH] reset: gpio: check the return value of gpiod_set_value_cansleep() Bartosz Golaszewski
2026-01-08 12:02 ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®