Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;