mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dmaengine: owl: Check IRQ lookup result
@ 2026-11-15  6:45 Alex Guo
  2026-11-17 18:13 ` Frank Li
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Guo @ 2026-11-15  6:45 UTC (permalink / raw)
  To: vkoul, afaerber, mani
  Cc: Frank.Li, dmaengine, linux-arm-kernel, linux-actions, linux-kernel

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").

Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
Signed-off-by: Alex Guo <alexguo1023@gmail.com>
---
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: owl: Check IRQ lookup result
  2026-11-15  6:45 [PATCH] dmaengine: owl: Check IRQ lookup result Alex Guo
@ 2026-11-17 18:13 ` Frank Li
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Li @ 2026-11-17 18:13 UTC (permalink / raw)
  To: Alex Guo
  Cc: vkoul, afaerber, mani, Frank.Li, dmaengine, linux-arm-kernel,
	linux-actions, linux-kernel

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@nxp.com>

> Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
> Signed-off-by: Alex Guo <alexguo1023@gmail.com>
> ---
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-17 18:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-15  6:45 [PATCH] dmaengine: owl: Check IRQ lookup result Alex Guo
2026-11-17 18:13 ` Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®