Skip to content

Commit c9c59da

Browse files
MrVanvinodkoul
authored andcommitted
dmaengine: fsl-edma: cleanup chan after dma_async_device_unregister
There is kernel dump when do module test: sysfs: cannot create duplicate filename /devices/platform/soc@0/44000000.bus/44000000.dma-controller/dma/dma0chan0 __dma_async_device_channel_register+0x128/0x19c dma_async_device_register+0x150/0x454 fsl_edma_probe+0x6cc/0x8a0 platform_probe+0x68/0xc8 fsl_edma_cleanup_vchan will unlink vchan.chan.device_node, while dma_async_device_unregister needs the link to do __dma_async_device_channel_unregister. So need move fsl_edma_cleanup_vchan after dma_async_device_unregister to make sure channel could be freed. So clean up chan after dma_async_device_unregister to address this. Fixes: 6f93b93 ("dmaengine: fsl-edma: kill the tasklets upon exit") Reviewed-by: Frank Li <[email protected]> Signed-off-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 6ec29d4 commit c9c59da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/fsl-edma-main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,9 +802,9 @@ static void fsl_edma_remove(struct platform_device *pdev)
802802
struct fsl_edma_engine *fsl_edma = platform_get_drvdata(pdev);
803803

804804
fsl_edma_irq_exit(pdev, fsl_edma);
805-
fsl_edma_cleanup_vchan(&fsl_edma->dma_dev);
806805
of_dma_controller_free(np);
807806
dma_async_device_unregister(&fsl_edma->dma_dev);
807+
fsl_edma_cleanup_vchan(&fsl_edma->dma_dev);
808808
fsl_disable_clocks(fsl_edma, fsl_edma->drvdata->dmamuxs);
809809
}
810810

0 commit comments

Comments
 (0)