From: sashiko-bot@kernel.org
To: "Lee Jones" <lee@kernel.org>,
linux-amlogic@lists.infradead.org, dmaengine@vger.kernel.org
Cc: vkoul@kernel.org, Frank.Li@kernel.org, neil.armstrong@linaro.org
Subject: Re: [PATCH 05/10] dmaengine: amlogic: Destroy free_wq after devres DMA device unregistration
Date: Wed, 11 Nov 2026 22:23:57 +0000 [thread overview]
Message-ID: <sashiko-outbox-209783@kernel.org> (raw)
In-Reply-To: <20261111215349.1983909-6-lee@kernel.org>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] dmaengine: amlogic: missing platform_get_irq() error check in
aml_dma_probe() [1]
--
commit 2bde83d0cee966b150690899ee8af15d0fb91330
Author: Lee Jones <lee@kernel.org>
dmaengine: amlogic: Destroy free_wq after devres DMA device unregistration
This commit switches aml_dma->free_wq to devm_alloc_ordered_workqueue() so
that the workqueue is cleaned up on probe failure and destroyed after
devres unregisters the DMA device on removal.
> diff --git a/drivers/dma/amlogic-dma.c b/drivers/dma/amlogic-dma.c
> index 684121d13fcab..791bd82743d31 100644
> --- a/drivers/dma/amlogic-dma.c
> +++ b/drivers/dma/amlogic-dma.c
> @@ -620,7 +620,7 @@ static int aml_dma_probe(struct platform_device *pdev)
> if (!aml_dma)
> return -ENOMEM;
>
> - aml_dma->free_wq = alloc_ordered_workqueue("aml_dma_free", 0);
> + aml_dma->free_wq = devm_alloc_ordered_workqueue(&pdev->dev, "aml_dma_free", 0);
> if (!aml_dma->free_wq)
> return -ENOMEM;
>
[Severity: Medium]
This problem wasn't introduced by this patch, but should aml_dma_probe()
check aml_dma->irq for errors after calling platform_get_irq() [1]?
drivers/dma/amlogic-dma.c:aml_dma_probe() {
...
aml_dma->irq = platform_get_irq(pdev, 0);
...
ret = devm_request_irq(&pdev->dev, aml_dma->irq, aml_dma_interrupt_handler,
0, dev_name(&pdev->dev), aml_dma);
}
If platform_get_irq() returns a negative error code such as -EPROBE_DEFER,
passing aml_dma->irq to devm_request_irq() converts it to a large unsigned
IRQ number that fails with -EINVAL, turning probe deferral into a
permanent probe failure.
[1] https://sashiko.dev/#/bug/linux-bec1576a-66f2-4328-8c01-0836c0f63d2a
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111215349.1983909-1-lee@kernel.org?part=5
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
prev parent reply other threads:[~2026-11-11 22:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 21:52 [PATCH 00/10] dmaengine: Fix teardown races, resource leaks, and error handling Lee Jones
2026-11-11 21:52 ` [PATCH 05/10] dmaengine: amlogic: Destroy free_wq after devres DMA device unregistration Lee Jones
2026-11-11 22:23 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-209783@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=lee@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®