[PATCH v2 2/3] dmaengine: lpc18xx-dmamux: Use managed DMA router registration

Vladimir Zapolskiy vz at mleia.com
Sat Nov 28 05:22:29 PST 2026


On 11/27/26 13:03, Tian Xuechen wrote:
> The DMA router remains in the OF registry after its device-managed
> data is released. Use managed registration to remove the routing
> entry before the router data is freed.
> 
> This issue was found by our static analysis tool under development.
> 
> Fixes: e5f4ae84be74 ("dmaengine: add driver for lpc18xx dmamux")

The change is correct, but it should be clear that the fix does not
apply to the fixed commit:

Cc: stable+noautosel at kernel.org # relies on new API

> Signed-off-by: Tian Xuechen <202300460064 at mail.sdu.edu.cn>
> ---
> Changes in v2:
>    - Use devm_of_dma_router_register() instead of a remove callback.
> 
>   drivers/dma/lpc18xx-dmamux.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/lpc18xx-dmamux.c b/drivers/dma/lpc18xx-dmamux.c
> index d3ff521951b8..0c6758c53a72 100644
> --- a/drivers/dma/lpc18xx-dmamux.c
> +++ b/drivers/dma/lpc18xx-dmamux.c
> @@ -166,8 +166,9 @@ static int lpc18xx_dmamux_probe(struct platform_device *pdev)
>   	dmamux->dmarouter.dev = &pdev->dev;
>   	dmamux->dmarouter.route_free = lpc18xx_dmamux_free;
>   
> -	return of_dma_router_register(np, lpc18xx_dmamux_reserve,
> -				      &dmamux->dmarouter);
> +	return devm_of_dma_router_register(&pdev->dev, np,
> +					   lpc18xx_dmamux_reserve,
> +					   &dmamux->dmarouter);
>   }
>   
>   static const struct of_device_id lpc18xx_dmamux_match[] = {

Reviewed-by: Vladimir Zapolskiy <vz at mleia.com>

-- 
Best wishes,
Vladimir



More information about the linux-arm-kernel mailing list