From: Frank Li <Frank.li@oss.nxp.com>
To: Tian Xuechen <202300460064@mail.sdu.edu.cn>
Cc: amelie.delaunay@foss.st.com, vkoul@kernel.org,
mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
cedric.madianga@gmail.com, pierre-yves.mordret@st.com,
Frank.Li@kernel.org, dmaengine@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] dmaengine: stm32-dmamux: Unregister the DMA router on removal
Date: Fri, 27 Nov 2026 09:15:39 -0600 [thread overview]
Message-ID: <awmem4rf9yPfggMa@SMW015318> (raw)
In-Reply-To: <20261127113332.390552-2-202300460064@mail.sdu.edu.cn>
On Fri, Nov 27, 2026 at 07:33:30PM +0800, Tian Xuechen wrote:
> From: Tian Xuechen <202300460064@mail.sdu.edu.cn>
>
> The DMA router remains in the OF registry after its device-managed
> data is released. Remove the routing entry when the device is
> unbound.
>
> This issue was found by our static analysis tool under development.
>
> Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver")
> Signed-off-by: Tian Xuechen <202300460064@mail.sdu.edu.cn>
> ---
> drivers/dma/stm32/stm32-dmamux.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/dma/stm32/stm32-dmamux.c b/drivers/dma/stm32/stm32-dmamux.c
> index 57318715d9f3..6f49d78bfe3d 100644
> --- a/drivers/dma/stm32/stm32-dmamux.c
> +++ b/drivers/dma/stm32/stm32-dmamux.c
> @@ -389,8 +389,14 @@ static const struct of_device_id stm32_dmamux_match[] = {
> {},
> };
>
> +static void stm32_dmamux_remove(struct platform_device *pdev)
> +{
> + of_dma_router_free(pdev->dev.of_node);
> +}
> +
Add dev manage API for router_register()
Frank
> static struct platform_driver stm32_dmamux_driver = {
> .probe = stm32_dmamux_probe,
> + .remove = stm32_dmamux_remove,
> .driver = {
> .name = "stm32-dmamux",
> .of_match_table = stm32_dmamux_match,
>
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-11-27 15:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 11:33 [PATCH 0/3] dmaengine: stm32: Pair DMA provider registration with cleanup Tian Xuechen
2026-11-27 11:33 ` [PATCH 1/3] dmaengine: stm32-dmamux: Unregister the DMA router on removal Tian Xuechen
2026-11-27 11:50 ` sashiko-bot
2026-11-27 15:15 ` Frank Li [this message]
2026-11-27 11:33 ` [PATCH 2/3] dmaengine: stm32-dma: Unregister the OF controller and DMA device Tian Xuechen
2026-11-27 11:45 ` sashiko-bot
2026-11-27 15:14 ` Frank Li
2026-11-27 11:33 ` [PATCH 3/3] dmaengine: stm32-mdma: Use managed OF DMA controller registration Tian Xuechen
2026-11-27 14:48 ` [PATCH 0/3] dmaengine: stm32: Pair DMA provider registration with cleanup Amelie Delaunay
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=awmem4rf9yPfggMa@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=202300460064@mail.sdu.edu.cn \
--cc=Frank.Li@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=cedric.madianga@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=pierre-yves.mordret@st.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.