Skip to contentSkip to conversation

dmaengine: mmp_tdma: add missed of_dma_controller_free

PATCH Applied Chuhong Yuan 2 participants 2 messages Nov 15, 2019 – Nov 22, 2019 dmaengine

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dmaengine: mmp_tdma: add missed of_dma_controller_free

The driver calls of_dma_controller_register in probe but does not free it in remove.
Add the call to fix it.

---
 drivers/dma/mmp_tdma.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/dma/mmp_tdma.c +3 -0
index e7d1e12bf464..10117f271b12 100644
@@ -544,6 +544,9 @@ static void mmp_tdma_issue_pending(struct dma_chan *chan)
 
 static int mmp_tdma_remove(struct platform_device *pdev)
 {
+	if (pdev->dev.of_node)
+		of_dma_controller_free(pdev->dev.of_node);
+
 	return 0;
 }
 
Signature · 1 line
2.24.0
maintainer Applied
#1 lore raw
Quoted 3 lines · Chuhong Yuan

The driver calls of_dma_controller_register in probe but does not free it in remove.
Add the call to fix it.

Applied both, thanks.

Signature · 1 line
~Vinod