Skip to content

Commit

Permalink
wcn36xx: Don't use the destroyed hal_mutex
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
andersson authored and kvalo committed Jan 12, 2017
1 parent 43efa3c commit d536288
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/ath/wcn36xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
Expand Down

0 comments on commit d536288

Please sign in to comment.