diff mbox series

dmaengine: owl-dma: Fix a resource leak in the remove function

Message ID 20201212162535.95727-1-christophe.jaillet@wanadoo.fr (mailing list archive)
State New, archived
Headers show
Series dmaengine: owl-dma: Fix a resource leak in the remove function | expand

Commit Message

Christophe JAILLET Dec. 12, 2020, 4:25 p.m. UTC
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>
---
 drivers/dma/owl-dma.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Vinod Koul Jan. 12, 2021, 12:31 p.m. UTC | #1
On 12-12-20, 17:25, Christophe JAILLET wrote:
> 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.

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/dma/owl-dma.c b/drivers/dma/owl-dma.c
index 9fede32641e9..04202d75f4ee 100644
--- a/drivers/dma/owl-dma.c
+++ b/drivers/dma/owl-dma.c
@@ -1245,6 +1245,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;
 }