rsi: add fix for crash during assertions

Observed crash in some scenarios when assertion has occurred,
this is because hw structure is freed and is tried to get
accessed in some functions where null check is already
present. So, avoided the crash by making the hw to NULL after
freeing.

Signed-off-by: Sanjay Konduri <sanjay.konduri@redpinesignals.com>
Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Sanjay Konduri 2018-05-15 14:34:30 +05:30 committed by Kalle Valo
parent 8800196824
commit abd39c6ded
1 changed files with 1 additions and 0 deletions

View File

@ -245,6 +245,7 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
ieee80211_stop_queues(hw); ieee80211_stop_queues(hw);
ieee80211_unregister_hw(hw); ieee80211_unregister_hw(hw);
ieee80211_free_hw(hw); ieee80211_free_hw(hw);
adapter->hw = NULL;
} }
for (band = 0; band < NUM_NL80211_BANDS; band++) { for (band = 0; band < NUM_NL80211_BANDS; band++) {