diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2017-01-11 17:32:21 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2017-01-12 13:43:59 +0300 |
commit | d53628882255481b710641dd0118fbd80af6e983 (patch) | |
tree | a8ad39ed4a2af51681b3c976161d22bd034327c0 /drivers | |
parent | 43efa3c0f241e04862be8e6a68ff765d36cde1ba (diff) | |
download | linux-d53628882255481b710641dd0118fbd80af6e983.tar.xz |
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>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-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; |