[PATCH] gpio: pxa: propagate pxa_gpio_probe_dt() error code
From: Haotian Zhang
Date: Fri Oct 09 2026 - 01:06:25 EST
pxa_gpio_probe_dt() returns the negative errno produced by
devm_irq_alloc_descs(), which may be -ENOMEM, -EINVAL or -EEXIST. The
caller in pxa_gpio_probe() overwrites that value with a fixed -EINVAL, so
the actual reason for the failure is lost.
Return irq_base so that the original error code is propagated.
Fixes: 384ca3c6a28d ("gpio: pxa: change the interrupt management")
Assisted-by: DeepSeek-V4.1-Flash
Signed-off-by: Haotian Zhang <vulab@xxxxxxxxxxx>
---
drivers/gpio/gpio-pxa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index 2b5da973f51f..ef3f21723b09 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -632,7 +632,7 @@ static int pxa_gpio_probe(struct platform_device *pdev)
} else {
irq_base = pxa_gpio_probe_dt(pdev, pchip);
if (irq_base < 0)
- return -EINVAL;
+ return irq_base;
}
if (!pxa_last_gpio)
--
2.25.1