From: Christophe JAILLET Date: Sat, 12 Dec 2020 16:25:35 +0000 (+0100) Subject: dmaengine: owl-dma: Fix a resource leak in the remove function X-Git-Tag: v5.12-rc1~57^2~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f0a16f04113f9f0ab0c8e6d3abe661edab549e6;p=thirdparty%2Fkernel%2Flinux.git dmaengine: owl-dma: Fix a resource leak in the remove function 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 Link: https://lore.kernel.org/r/20201212162535.95727-1-christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/owl-dma.c b/drivers/dma/owl-dma.c index 25cbd363e5137..1f0bbaed4643a 100644 --- a/drivers/dma/owl-dma.c +++ b/drivers/dma/owl-dma.c @@ -1246,6 +1246,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; }