batman-adv: Remove redundant 'flush_workqueue()' calls
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 10 Jan 2022 21:32:27 +0000 (22:32 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Sun, 23 Jan 2022 09:42:11 +0000 (10:42 +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.

This was generated with coccinelle:

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

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/main.c

index 5207cd8d6ad834208e32d16391d4681c2e52f2fd..8f1b724d0412411eb97d300aa39e13779f3440f7 100644 (file)
@@ -132,7 +132,6 @@ static void __exit batadv_exit(void)
        rtnl_link_unregister(&batadv_link_ops);
        unregister_netdevice_notifier(&batadv_hard_if_notifier);
 
-       flush_workqueue(batadv_event_workqueue);
        destroy_workqueue(batadv_event_workqueue);
        batadv_event_workqueue = NULL;