summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rsi
diff options
context:
space:
mode:
authorSanjay Konduri <sanjay.konduri@redpinesignals.com>2018-05-15 12:04:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-17 21:45:41 +0300
commitba8bbddaa188235df007411fdead5832f9e0cb59 (patch)
treee21c9933bd370e5877abb6eda586f24e4c53add0 /drivers/net/wireless/rsi
parentf3848952e00578330e427e3008f9a099ba43985c (diff)
downloadlinux-ba8bbddaa188235df007411fdead5832f9e0cb59.tar.xz
rsi: add fix for crash during assertions
commit abd39c6ded9db53aa44c2540092bdd5fb6590fa8 upstream. 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> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/wireless/rsi')
-rw-r--r--drivers/net/wireless/rsi/rsi_91x_mac80211.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index fa12c05d9e23..233b2239311d 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -218,6 +218,7 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
ieee80211_stop_queues(hw);
ieee80211_unregister_hw(hw);
ieee80211_free_hw(hw);
+ adapter->hw = NULL;
}
for (band = 0; band < NUM_NL80211_BANDS; band++) {