]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dmaengine: owl-dma: Fix a resource leak in the remove function
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 12 Dec 2020 16:25:35 +0000 (17:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 08:39:43 +0000 (09:39 +0100)
[ Upstream commit 1f0a16f04113f9f0ab0c8e6d3abe661edab549e6 ]

A 'dma_pool_destroy()' call is missing in the remove function.
Add it.

This call is already made in the error handling path of the probe function.

Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20201212162535.95727-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/owl-dma.c

index 7ff04bf04b31b585e2cca43624b78b6a5b3bdf93..da5050ab7f38726ec3ac3b8c2cbb6c5ca5e68c01 100644 (file)
@@ -932,6 +932,7 @@ static int owl_dma_remove(struct platform_device *pdev)
        owl_dma_free(od);
 
        clk_disable_unprepare(od->clk);
+       dma_pool_destroy(od->lli_pool);
 
        return 0;
 }