From: Avi Weiss <thnkslprpt@gmail.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: Rosen Penev <rosenp@gmail.com>, Pan Chuang <panchuang@vivo.com>,
Carlos Chinea <carlos.chinea@nokia.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] HSI: omap_ssi: propagate wake IRQ setup errors
Date: Fri, 30 Oct 2026 17:18:33 +0200 [thread overview]
Message-ID: <20261030151832.2453569-2-thnkslprpt@gmail.com> (raw)
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
reply other threads:[~2026-10-30 15:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261030151832.2453569-2-thnkslprpt@gmail.com \
--to=thnkslprpt@gmail.com \
--cc=carlos.chinea@nokia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=panchuang@vivo.com \
--cc=rosenp@gmail.com \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®