dmaengine: mmp_tdma: add missed of_dma_controller_free
authorChuhong Yuan <hslester96@gmail.com>
Fri, 15 Nov 2019 08:31:00 +0000 (16:31 +0800)
committerVinod Koul <vkoul@kernel.org>
Fri, 22 Nov 2019 05:21:29 +0000 (10:51 +0530)
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>
Link: https://lore.kernel.org/r/20191115083100.12220-1-hslester96@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/mmp_tdma.c

index e7d1e12..10117f2 100644 (file)
@@ -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;
 }