浏览代码

dmaengine: mv_xor_v2: kill the tasklets upon exit

The mv_xor_v2 driver uses a tasklet, initialized during the probe()
routine. However, it forgets to cleanup the tasklet using
tasklet_kill() function during the remove() routine, which this patch
fixes. This prevents the tasklet from potentially running after the
module has been removed.

Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver")

Signed-off-by: Hanna Hawa <hannah@marvell.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Hanna Hawa 7 年之前
父节点
当前提交
8bbafed8dd
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/dma/mv_xor_v2.c

+ 2 - 0
drivers/dma/mv_xor_v2.c

@@ -903,6 +903,8 @@ static int mv_xor_v2_remove(struct platform_device *pdev)
 
 
 	platform_msi_domain_free_irqs(&pdev->dev);
 	platform_msi_domain_free_irqs(&pdev->dev);
 
 
+	tasklet_kill(&xor_dev->irq_tasklet);
+
 	clk_disable_unprepare(xor_dev->clk);
 	clk_disable_unprepare(xor_dev->clk);
 
 
 	return 0;
 	return 0;