Commit c1861ff1 authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Kalle Valo

wifi: libertas: add missing calls to cancel_work_sync()

Add missing 'cancel_work_sync()' in 'if_sdio_remove()'
and on error handling path in 'if_sdio_probe()'.
Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
Tested-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230725060531.72968-1-dmantipov@yandex.ru
parent e7899a90
......@@ -1233,6 +1233,7 @@ static int if_sdio_probe(struct sdio_func *func,
flush_workqueue(card->workqueue);
lbs_remove_card(priv);
free:
cancel_work_sync(&card->packet_worker);
destroy_workqueue(card->workqueue);
err_queue:
while (card->packets) {
......@@ -1277,6 +1278,7 @@ static void if_sdio_remove(struct sdio_func *func)
lbs_stop_card(card->priv);
lbs_remove_card(card->priv);
cancel_work_sync(&card->packet_worker);
destroy_workqueue(card->workqueue);
while (card->packets) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment