diff mbox series

[1/2] dmaengine: mmp_tdma: add missed of_dma_controller_free

Message ID 20191115083100.12220-1-hslester96@gmail.com (mailing list archive)
State Accepted
Headers show
Series [1/2] dmaengine: mmp_tdma: add missed of_dma_controller_free | expand

Commit Message

Chuhong Yuan Nov. 15, 2019, 8:31 a.m. UTC
The driver calls of_dma_controller_register in probe but does not free
it in remove.
Add the call to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
 drivers/dma/mmp_tdma.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Vinod Koul Nov. 22, 2019, 5:22 a.m. UTC | #1
On 15-11-19, 16:31, Chuhong Yuan wrote:
> 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.
diff mbox series

Patch

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index e7d1e12bf464..10117f271b12 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -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;
 }