[PATCH 1/4] watchdog: qcom: Propagate errors from optional IRQ lookup
phucduc.bui at gmail.com
phucduc.bui at gmail.com
Fri Aug 7 01:16:49 PDT 2026
From: bui duc phuc <phucduc.bui at gmail.com>
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no IRQ is available, while other errors should be propagated.
Instead of only checking for -EPROBE_DEFER, propagate all error codes
returned by platform_get_irq_optional() other than -ENXIO, so that
failures are properly reported to the caller.
Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
---
drivers/watchdog/qcom-wdt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
index 49bd04841f0c..a8eb1d8f24f0 100644
--- a/drivers/watchdog/qcom-wdt.c
+++ b/drivers/watchdog/qcom-wdt.c
@@ -298,8 +298,8 @@ static int qcom_wdt_probe(struct platform_device *pdev)
wdt->wdd.info = &qcom_wdt_pt_info;
wdt->wdd.pretimeout = 1;
} else {
- if (irq == -EPROBE_DEFER)
- return -EPROBE_DEFER;
+ if (irq != -ENXIO)
+ return irq;
wdt->wdd.info = &qcom_wdt_info;
}
--
2.43.0
More information about the linux-arm-kernel
mailing list