Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bus: brcmstb_gisb: Check required IRQ lookup results
@ 2026-11-14 14:22 Alex Guo
  2026-11-19 22:58 ` Florian Fainelli
  2026-11-19 23:01 ` Florian Fainelli
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Guo @ 2026-11-14 14:22 UTC (permalink / raw)
  To: florian.fainelli
  Cc: bcm-kernel-feedback-list, arnd, linux-arm-kernel, linux-kernel

platform_get_irq() can return a negative error code for the timeout
or target abort interrupt. Passing it to devm_request_irq() can
replace the lookup error with -EINVAL.

Check both lookup results and return the original error before
requesting either interrupt.

A similar issue was fixed in commit 47c3e06ed95a
("spi: tegra210-quad: Fix missin IRQ check in tegra_qspi_probe").

Fixes: 44127b771d9c ("bus: add Broadcom GISB bus arbiter timeout/error handler")
Signed-off-by: Alex Guo <alexguo1023@gmail.com>
---
Build-tested the affected driver object with Clang 18 for ARM
(multi_v7_defconfig). No hardware test was performed.

 drivers/bus/brcmstb_gisb.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c
index 113a09e10328..c0dd2e3205ff 100644
--- a/drivers/bus/brcmstb_gisb.c
+++ b/drivers/bus/brcmstb_gisb.c
@@ -419,7 +419,13 @@ static int __init brcmstb_gisb_arb_probe(struct
platform_device *pdev)
        int i, first, last;

        timeout_irq = platform_get_irq(pdev, 0);
+       if (timeout_irq < 0)
+               return timeout_irq;
+
        tea_irq = platform_get_irq(pdev, 1);
+       if (tea_irq < 0)
+               return tea_irq;
+
        bp_irq = platform_get_irq(pdev, 2);

        gdev = devm_kzalloc_obj(&pdev->dev, *gdev);
--
2.43.0


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

end of thread, other threads:[~2026-11-19 23:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-14 14:22 [PATCH] bus: brcmstb_gisb: Check required IRQ lookup results Alex Guo
2026-11-19 22:58 ` Florian Fainelli
2026-11-19 23:01 ` Florian Fainelli

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