Commit d5362888 authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Kalle Valo

wcn36xx: Don't use the destroyed hal_mutex

ieee80211_unregister_hw() might invoke operations to stop the interface,
that uses the hal_mutex. So don't destroy it until after we're done
using it.
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 43efa3c0
...@@ -1241,7 +1241,6 @@ static int wcn36xx_remove(struct platform_device *pdev) ...@@ -1241,7 +1241,6 @@ static int wcn36xx_remove(struct platform_device *pdev)
wcn36xx_dbg(WCN36XX_DBG_MAC, "platform remove\n"); wcn36xx_dbg(WCN36XX_DBG_MAC, "platform remove\n");
release_firmware(wcn->nv); release_firmware(wcn->nv);
mutex_destroy(&wcn->hal_mutex);
ieee80211_unregister_hw(hw); ieee80211_unregister_hw(hw);
...@@ -1250,6 +1249,8 @@ static int wcn36xx_remove(struct platform_device *pdev) ...@@ -1250,6 +1249,8 @@ static int wcn36xx_remove(struct platform_device *pdev)
iounmap(wcn->dxe_base); iounmap(wcn->dxe_base);
iounmap(wcn->ccu_base); iounmap(wcn->ccu_base);
mutex_destroy(&wcn->hal_mutex);
ieee80211_free_hw(hw); ieee80211_free_hw(hw);
return 0; return 0;
......
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