media: mtk-mdp: Remove redundant 'flush_workqueue()' calls
authorXu Wang <vulab@iscas.ac.cn>
Fri, 14 Jan 2022 08:22:14 +0000 (09:22 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 7 Mar 2022 10:05:41 +0000 (11:05 +0100)
'destroy_workqueue()' already drains the queue before destroying it, so
there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/mtk-mdp/mtk_mdp_core.c

index 3d39594..d83c496 100644 (file)
@@ -245,10 +245,8 @@ 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);
 
        list_for_each_entry_safe(comp, comp_temp, &mdp->comp_list, node) {