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: Dmitry Antipov <dmantipov@yandex.ru>
Tested-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230725060531.72968-1-dmantipov@yandex.ru
This commit is contained in:
Dmitry Antipov 2023-07-25 09:04:43 +03:00 committed by Kalle Valo
parent e7899a90ce
commit c1861ff1d6

View File

@ -1233,6 +1233,7 @@ err_activate_card:
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) {