Commit b0ea758b authored by Yang Yingliang's avatar Yang Yingliang Committed by Kalle Valo

wifi: rtw88: add missing destroy_workqueue() on error path in rtw_core_init()

Add the missing destroy_workqueue() before return from rtw_core_init()
in error path.

Fixes: fe101716 ("rtw88: replace tx tasklet with work queue")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220826023817.3908255-1-yangyingliang@huawei.com
parent f97c81f5
......@@ -2093,7 +2093,7 @@ int rtw_core_init(struct rtw_dev *rtwdev)
ret = rtw_load_firmware(rtwdev, RTW_NORMAL_FW);
if (ret) {
rtw_warn(rtwdev, "no firmware loaded\n");
return ret;
goto out;
}
if (chip->wow_fw_name) {
......@@ -2103,11 +2103,15 @@ int rtw_core_init(struct rtw_dev *rtwdev)
wait_for_completion(&rtwdev->fw.completion);
if (rtwdev->fw.firmware)
release_firmware(rtwdev->fw.firmware);
return ret;
goto out;
}
}
return 0;
out:
destroy_workqueue(rtwdev->tx_wq);
return ret;
}
EXPORT_SYMBOL(rtw_core_init);
......
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