[PATCH v3 5/6] ASoC: dwc: Propagate optional IRQ lookup errors
From: phucduc . bui
Date: Tue Nov 10 2026 - 21:29:38 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
platform_get_irq_optional() can return errors other than
-EPROBE_DEFER. Propagate these errors instead of silently
continuing, while treating -ENXIO as the absence of an IRQ.
Use dev_err_probe() to report IRQ lookup failures and ensure
the reset is asserted when IRQ lookup fails.
Fixes: 564db8b8da8d ("ASoC: dwc: Propagate -EPROBE_DEFER from IRQ lookup")
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
Changes in v3:
- Ensure the reset is asserted when IRQ lookup fails,
as suggested by Sashiko.
- Add a Fixes tag
sound/soc/dwc/dwc-i2s.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c
index b0d3413c27d2..55a5dca7b79f 100644
--- a/sound/soc/dwc/dwc-i2s.c
+++ b/sound/soc/dwc/dwc-i2s.c
@@ -961,8 +961,10 @@ static int dw_i2s_probe(struct platform_device *pdev)
}
irq = platform_get_irq_optional(pdev, 0);
- if (irq == -EPROBE_DEFER)
- return irq;
+ if (irq < 0 && irq != -ENXIO) {
+ ret = dev_err_probe(&pdev->dev, irq, "failed to get IRQ\n");
+ goto err_assert_reset;
+ }
if (irq > 0) {
ret = devm_request_irq(&pdev->dev, irq, i2s_irq_handler, 0,
pdev->name, dev);
--
2.43.0