[PATCH v2] dmaengine: owl: Check IRQ lookup result

From: Alex Guo

Date: Thu Nov 19 2026 - 04:38:41 EST


owl_dma_probe() passes the result of platform_get_irq() to
devm_request_irq() even when the lookup fails. The request can replace
the original error with -EINVAL.

Return the lookup error before requesting the DMA interrupt, so a
deferred probe can be retried.

Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
Signed-off-by: Alex Guo <alexguo1023@xxxxxxxxx>
---
Changes in v2:
- Drop the paragraph referring to the similar Tegra QSPI fix.
- Add Frank Li's Reviewed-by tag.

Build-tested the affected driver object with Clang 18 for arm64.
No hardware test was performed.

drivers/dma/owl-dma.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/dma/owl-dma.c b/drivers/dma/owl-dma.c
index 31a6c6e01a75..daea82718229 100644
--- a/drivers/dma/owl-dma.c
+++ b/drivers/dma/owl-dma.c
@@ -1156,6 +1156,9 @@ static int owl_dma_probe(struct platform_device *pdev)
* simplification.
*/
od->irq = platform_get_irq(pdev, 0);
+ if (od->irq < 0)
+ return od->irq;
+
ret = devm_request_irq(&pdev->dev, od->irq, owl_dma_interrupt, 0,
dev_name(&pdev->dev), od);
if (ret) {
--
2.43.0

On Tue, 17 Nov 2026 13:13:07 -0500, Frank Li <Frank.li@xxxxxxxxxxx> wrote:
> On Sun, Nov 15, 2026 at 02:45:05PM +0800, Alex Guo wrote:
> > owl_dma_probe() passes the result of platform_get_irq() to
> > devm_request_irq() even when the lookup fails. The request can replace
> > the original error with -EINVAL.
> >
> > Return the lookup error before requesting the DMA interrupt, so a
> > deferred probe can be retried.
> >
> > A similar issue was fixed in commit 47c3e06ed95a
> > ("spi: tegra210-quad: Fix missing IRQ check in tegra_qspi_probe").
> >
>
> Drop this paragraph.
>
> Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
>
> > Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
> > Signed-off-by: Alex Guo <alexguo1023@xxxxxxxxx>
> > ---
> > Build-tested the affected driver object with Clang 18 for arm64.
> > No hardware test was performed.
> >
> > drivers/dma/owl-dma.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/dma/owl-dma.c b/drivers/dma/owl-dma.c
> > index 31a6c6e01a75..daea82718229 100644
> > --- a/drivers/dma/owl-dma.c
> > +++ b/drivers/dma/owl-dma.c
> > @@ -1156,6 +1156,9 @@ static int owl_dma_probe(struct platform_device *pdev)
> > * simplification.
> > */
> > od->irq = platform_get_irq(pdev, 0);
> > + if (od->irq < 0)
> > + return od->irq;
> > +
> > ret = devm_request_irq(&pdev->dev, od->irq, owl_dma_interrupt, 0,
> > dev_name(&pdev->dev), od);
> > if (ret) {
> > --
> > 2.43.0