* [PATCH] HSI: omap_ssi: propagate wake IRQ setup errors
@ 2026-10-30 15:18 Avi Weiss
0 siblings, 0 replies; only message in thread
From: Avi Weiss @ 2026-10-30 15:18 UTC (permalink / raw)
To: Sebastian Reichel; +Cc: Rosen Penev, Pan Chuang, Carlos Chinea, linux-kernel
ssi_wake_irq() overwrites a failed devm_request_threaded_irq()
result with the result of enable_irq_wake(). Wake configuration
can succeed without an installed IRQ handler, allowing port probe
to succeed without CAWAKE interrupt handling.
A negative gpiod_to_irq() result is also passed to the IRQ APIs,
losing errors such as -EPROBE_DEFER. Return both errors before
enabling IRQ wake.
Fixes: b209e047bc743 ("HSI: Introduce OMAP SSI driver")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
drivers/hsi/controllers/omap_ssi_port.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c
index 63e8bc44630a..6476c75f063c 100644
--- a/drivers/hsi/controllers/omap_ssi_port.c
+++ b/drivers/hsi/controllers/omap_ssi_port.c
@@ -1039,12 +1039,16 @@ static int ssi_wake_irq(struct hsi_port *port, struct platform_device *pd)
}
cawake_irq = gpiod_to_irq(omap_port->wake_gpio);
+ if (cawake_irq < 0)
+ return cawake_irq;
omap_port->wake_irq = cawake_irq;
err = devm_request_threaded_irq(&port->device, cawake_irq, NULL,
ssi_wake_thread,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
"SSI cawake", port);
+ if (err < 0)
+ return err;
err = enable_irq_wake(cawake_irq);
if (err < 0)
dev_err(&port->device, "Enable wake on the wakeline in irq %d failed %d\n",
base-commit: d89e1d186ec9271bf78e62771779e9fc03bf0fc3
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-30 15:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 15:18 [PATCH] HSI: omap_ssi: propagate wake IRQ setup errors Avi Weiss
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®