All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: owl-dma: Fix a resource leak in the remove function
@ 2020-12-12 16:25 ` Christophe JAILLET
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2020-12-12 16:25 UTC (permalink / raw)
  To: vkoul, dan.j.williams, afaerber, manivannan.sadhasivam
  Cc: dmaengine, linux-arm-kernel, linux-kernel, kernel-janitors,
	Christophe JAILLET

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(+)

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;
 }
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] dmaengine: owl-dma: Fix a resource leak in the remove function
@ 2020-12-12 16:25 ` Christophe JAILLET
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2020-12-12 16:25 UTC (permalink / raw)
  To: vkoul, dan.j.williams, afaerber, manivannan.sadhasivam
  Cc: dmaengine, linux-arm-kernel, linux-kernel, kernel-janitors,
	Christophe JAILLET

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(+)

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;
 }
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] dmaengine: owl-dma: Fix a resource leak in the remove function
@ 2020-12-12 16:25 ` Christophe JAILLET
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2020-12-12 16:25 UTC (permalink / raw)
  To: vkoul, dan.j.williams, afaerber, manivannan.sadhasivam
  Cc: dmaengine, Christophe JAILLET, kernel-janitors, linux-kernel,
	linux-arm-kernel

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(+)

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;
 }
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] dmaengine: owl-dma: Fix a resource leak in the remove function
  2020-12-12 16:25 ` Christophe JAILLET
  (?)
@ 2021-01-12 12:31   ` Vinod Koul
  -1 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2021-01-12 12:31 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: dan.j.williams, afaerber, manivannan.sadhasivam, dmaengine,
	linux-arm-kernel, linux-kernel, kernel-janitors

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

-- 
~Vinod

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dmaengine: owl-dma: Fix a resource leak in the remove function
@ 2021-01-12 12:31   ` Vinod Koul
  0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2021-01-12 12:31 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: kernel-janitors, linux-kernel, manivannan.sadhasivam, dmaengine,
	dan.j.williams, afaerber, linux-arm-kernel

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

-- 
~Vinod

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dmaengine: owl-dma: Fix a resource leak in the remove function
@ 2021-01-12 12:31   ` Vinod Koul
  0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2021-01-12 12:43 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: dan.j.williams, afaerber, manivannan.sadhasivam, dmaengine,
	linux-arm-kernel, linux-kernel, kernel-janitors

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

-- 
~Vinod

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-12 12:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-12 16:25 [PATCH] dmaengine: owl-dma: Fix a resource leak in the remove function Christophe JAILLET
2020-12-12 16:25 ` Christophe JAILLET
2020-12-12 16:25 ` Christophe JAILLET
2021-01-12 12:31 ` Vinod Koul
2021-01-12 12:43   ` Vinod Koul
2021-01-12 12:31   ` Vinod Koul

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.