diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-10-11 15:23:31 -0700 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2017-01-31 16:04:07 +0000 |
commit | 3e5e461b34ec44385378dc3c496c39a74d71a41e (patch) | |
tree | 9967c8359062938bc42aad0ca2fe2e0350b1ae97 | |
parent | 8c22e81c6f11d3c073d80e7686010d52d0d8f81e (diff) |
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: Bjorn Andersson <bjorn.andersson@linaro.org>
-rw-r--r-- | drivers/net/wireless/ath/wcn36xx/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 96a9584edcbb..0002190c9041 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1241,7 +1241,6 @@ static int wcn36xx_remove(struct platform_device *pdev) wcn36xx_dbg(WCN36XX_DBG_MAC, "platform remove\n"); release_firmware(wcn->nv); - mutex_destroy(&wcn->hal_mutex); ieee80211_unregister_hw(hw); @@ -1250,6 +1249,8 @@ static int wcn36xx_remove(struct platform_device *pdev) iounmap(wcn->dxe_base); iounmap(wcn->ccu_base); + + mutex_destroy(&wcn->hal_mutex); ieee80211_free_hw(hw); return 0; |