'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);
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Acked-by: Peter Chen <peter.chen@kernel.or> # for chipidea part
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/563123a8117d6cafae3f134e497587bd2b8bb7f4.1636734453.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  */
 void ci_hdrc_otg_destroy(struct ci_hdrc *ci)
 {
-       if (ci->wq) {
-               flush_workqueue(ci->wq);
+       if (ci->wq)
                destroy_workqueue(ci->wq);
-       }
+
        /* Disable all OTG irq and clear status */
        hw_write_otgsc(ci, OTGSC_INT_EN_BITS | OTGSC_INT_STATUS_BITS,
                                                OTGSC_INT_STATUS_BITS);
 
 
        usb_del_gadget_udc(&udc->gadget);
 
-       if (udc->qwork) {
-               flush_workqueue(udc->qwork);
+       if (udc->qwork)
                destroy_workqueue(udc->qwork);
-       }
 
        /* free memory allocated in probe */
        dma_pool_destroy(udc->dtd_pool);
 
        platform_driver_unregister(&u132_platform_driver);
        printk(KERN_INFO "u132-hcd driver deregistered\n");
        wait_event(u132_hcd_wait, u132_instances == 0);
-       flush_workqueue(workqueue);
        destroy_workqueue(workqueue);
 }
 
 
 {
        struct mv_otg *mvotg = platform_get_drvdata(pdev);
 
-       if (mvotg->qwork) {
-               flush_workqueue(mvotg->qwork);
+       if (mvotg->qwork)
                destroy_workqueue(mvotg->qwork);
-       }
 
        mv_otg_disable(mvotg);
 
 err_disable_clk:
        mv_otg_disable_internal(mvotg);
 err_destroy_workqueue:
-       flush_workqueue(mvotg->qwork);
        destroy_workqueue(mvotg->qwork);
 
        return retval;
 
 
 void usbip_finish_eh(void)
 {
-       flush_workqueue(usbip_queue);
        destroy_workqueue(usbip_queue);
        usbip_queue = NULL;
 }