'destroy_workqueue()' already drains the queue before destroying it, so
there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

This was generated with coccinelle:

@@
expression E;
@@
- flush_workqueue(E);
  destroy_workqueue(E);

Signed-off-by: Chen Ni <nic...@iscas.ac.cn>
---
 drivers/accel/qaic/qaic_debugfs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/accel/qaic/qaic_debugfs.c 
b/drivers/accel/qaic/qaic_debugfs.c
index ba0cf2f94732..a991b8198dc4 100644
--- a/drivers/accel/qaic/qaic_debugfs.c
+++ b/drivers/accel/qaic/qaic_debugfs.c
@@ -240,7 +240,6 @@ static int qaic_bootlog_mhi_probe(struct mhi_device 
*mhi_dev, const struct mhi_d
 mhi_unprepare:
        mhi_unprepare_from_transfer(mhi_dev);
 destroy_workqueue:
-       flush_workqueue(qdev->bootlog_wq);
        destroy_workqueue(qdev->bootlog_wq);
 out:
        return ret;
@@ -253,7 +252,6 @@ static void qaic_bootlog_mhi_remove(struct mhi_device 
*mhi_dev)
        qdev = dev_get_drvdata(&mhi_dev->dev);
 
        mhi_unprepare_from_transfer(qdev->bootlog_ch);
-       flush_workqueue(qdev->bootlog_wq);
        destroy_workqueue(qdev->bootlog_wq);
        qdev->bootlog_ch = NULL;
 }
-- 
2.25.1

Reply via email to