[PATCH] bus: omap_l3_smx: Check IRQ lookup results
From: Alex Guo
Date: Sun Nov 15 2026 - 01:45:39 EST
omap3_l3_probe() passes both platform_get_irq() results to request_irq()
without checking them. A failed lookup can be reported as -EINVAL,
losing the original error and preventing a retry if the lookup returned
-EPROBE_DEFER.
Check each result before requesting the interrupt. Use the existing
cleanup paths so a failed application IRQ lookup also releases the debug
IRQ.
A similar issue was fixed in commit 47c3e06ed95a
("spi: tegra210-quad: Fix missing IRQ check in tegra_qspi_probe").
Fixes: e2fa61d40919 ("OMAP3: l3: Introduce l3-interconnect error
handling driver")
Signed-off-by: Alex Guo <alexguo1023@xxxxxxxxx>
---
Build-tested the affected driver object with Clang 18 for arm.
No hardware test was performed.
drivers/bus/omap_l3_smx.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c
index ee260c1fc087..7245be425f13 100644
--- a/drivers/bus/omap_l3_smx.c
+++ b/drivers/bus/omap_l3_smx.c
@@ -235,6 +235,11 @@ static int omap3_l3_probe(struct platform_device *pdev)
}
l3->debug_irq = platform_get_irq(pdev, 0);
+ if (l3->debug_irq < 0) {
+ ret = l3->debug_irq;
+ goto err1;
+ }
+
ret = request_irq(l3->debug_irq, omap3_l3_app_irq, IRQF_TRIGGER_RISING,
"l3-debug-irq", l3);
if (ret) {
@@ -243,6 +248,11 @@ static int omap3_l3_probe(struct platform_device *pdev)
}
l3->app_irq = platform_get_irq(pdev, 1);
+ if (l3->app_irq < 0) {
+ ret = l3->app_irq;
+ goto err2;
+ }
+
ret = request_irq(l3->app_irq, omap3_l3_app_irq, IRQF_TRIGGER_RISING,
"l3-app-irq", l3);
if (ret) {
--
2.43.0