Thread (19 messages) 19 messages, 3 authors, 2d ago

[PATCH 02/11] gpio: vf610: propagate return value to callers

flat view
WARM2d

From: Peng Fan (OSS) <hidden>
Date: 2026-10-29 13:45:52
Also in: imx, linux-devicetree, linux-gpio, lkml
Subsystem: gpio subsystem, the rest · Maintainers: Linus Walleij, Bartosz Golaszewski, Linus Torvalds

From: Peng Fan <peng.fan@nxp.com>

Fix the return value handling in vf610_gpio_irq_set_wake() to properly
propagate the return value from enable_irq_wake()/disable_irq_wake()
instead of always returning 0.

Fixes: 7f2691a19627 ("gpio: vf610: add gpiolib/IRQ chip driver for Vybrid")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/gpio/gpio-vf610.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index adfa2c2d5873..44b846ff1b93 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -188,13 +188,14 @@ static int vf610_gpio_irq_set_wake(struct irq_data *d, u32 enable)
 {
 	struct vf610_gpio_port *port =
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
+	int ret;
 
 	if (enable)
-		enable_irq_wake(port->irq);
+		ret = enable_irq_wake(port->irq);
 	else
-		disable_irq_wake(port->irq);
+		ret = disable_irq_wake(port->irq);
 
-	return 0;
+	return ret;
 }
 
 static const struct irq_chip vf610_irqchip = {
-- 
2.51.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help