Skip to contentSkip to conversation

dmaengine: mmp_pdma: add missed of_dma_controller_free

PATCH Applied Chuhong Yuan 1 participant 1 message Nov 15, 2019 dmaengine

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 dmaengine: mmp_pdma: 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_pdma.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/dma/mmp_pdma.c +2 -0
index 7fe494fc50d4..ad06f260e907 100644
@@ -945,6 +945,8 @@ static int mmp_pdma_remove(struct platform_device *op)
 	struct mmp_pdma_phy *phy;
 	int i, irq = 0, irq_num = 0;
 
+	if (op->dev.of_node)
+		of_dma_controller_free(op->dev.of_node);
 
 	for (i = 0; i < pdev->dma_channels; i++) {
 		if (platform_get_irq(op, i) > 0)
Signature · 1 line
2.24.0