media: platform: mtk-mdp: add missed destroy_workqueue in remove
authorChuhong Yuan <hslester96@gmail.com>
Wed, 13 Nov 2019 06:37:59 +0000 (07:37 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 13 Dec 2019 08:18:35 +0000 (09:18 +0100)
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.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/mtk-mdp/mtk_mdp_core.c

index c1e29a46ae6995c1a42b2cfaeb4a602cd924ca3b..aeaed2cf44588993918624c3ef8b40d0c8d8369e 100644 (file)
@@ -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);