Skip to contentSkip to conversation

media: platform: mtk-mdp: add missed destroy_workqueue in remove

PATCH New Chuhong Yuan 1 participant 1 message Nov 13, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: platform: mtk-mdp: add missed destroy_workqueue in remove

The driver misses destroying wdt_wq when remove like what is done when probe fails.
Add the missed calls like what is done to job_wq to fix it.

---
 drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/media/platform/mtk-mdp/mtk_mdp_core.c +3 -0
index c1e29a46ae69..aeaed2cf4458 100644
@@ -229,6 +229,9 @@ static int mtk_mdp_remove(struct platform_device *pdev)
 	mtk_mdp_unregister_m2m_device(mdp);
 	v4l2_device_unregister(&mdp->v4l2_dev);
 
+	flush_workqueue(mdp->wdt_wq);
+	destroy_workqueue(mdp->wdt_wq);
+
 	flush_workqueue(mdp->job_wq);
 	destroy_workqueue(mdp->job_wq);
 
Signature · 1 line
2.23.0