[PATCH 4/5] gpio: brcmstb: don't turn platform_get_irq errors into -ENOENT

From: shao.mingyin

Date: Sat Nov 07 2026 - 03:14:33 EST


From: Shao Mingyin <shao.mingyin@xxxxxxxxxx>

When the "interrupt-controller" property is present, brcmstb_gpio_probe()
maps any platform_get_irq() failure to -ENOENT. This swallows
-EPROBE_DEFER (the parent interrupt controller may not be probed yet),
so the device never gets retried and the GPIO controller is permanently
unavailable. Return the original error code instead.

Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
---
drivers/gpio/gpio-brcmstb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c
index 3b1aaea639..e23e8f267f 100644
--- a/drivers/gpio/gpio-brcmstb.c
+++ b/drivers/gpio/gpio-brcmstb.c
@@ -655,7 +655,7 @@
if (of_property_read_bool(np, "interrupt-controller")) {
priv->parent_irq = platform_get_irq(pdev, 0);
- if (priv->parent_irq <= 0)
- return -ENOENT;
+ if (priv->parent_irq < 0)
+ return priv->parent_irq;
} else {
priv->parent_irq = -ENOENT;
}