]> git.hungrycats.org Git - linux/commitdiff
ASoC: dwc: Propagate -EPROBE_DEFER from IRQ lookup
authorbui duc phuc <phucduc.bui@gmail.com>
Thu, 6 Aug 2026 06:10:45 +0000 (13:10 +0700)
committerMark Brown <broonie@kernel.org>
Mon, 10 Aug 2026 14:37:27 +0000 (15:37 +0100)
platform_get_irq_optional() never returns 0. It returns a positive IRQ
number on success or a negative error code on failure.

Return -EPROBE_DEFER from platform_get_irq_optional() so the driver is
re-probed when the interrupt resource becomes available instead of
continuing probe without an IRQ.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260806061046.25323-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/dwc/dwc-i2s.c

index 74dfd39fd6047d077c111825bc9a65c1f81195f5..2e9fb79b1cd8b8c039fe4fe531a4fca85ed72a75 100644 (file)
@@ -955,7 +955,9 @@ static int dw_i2s_probe(struct platform_device *pdev)
        }
 
        irq = platform_get_irq_optional(pdev, 0);
-       if (irq >= 0) {
+       if (irq == -EPROBE_DEFER)
+               return irq;
+       if (irq > 0) {
                ret = devm_request_irq(&pdev->dev, irq, i2s_irq_handler, 0,
                                pdev->name, dev);
                if (ret < 0) {