rtl8192ce: Fix null dereference in watchdog
[pandora-kernel.git] / drivers / net / wireless / rtlwifi / rtl8192c / dm_common.c
index a004ad7..ba7ef2f 100644 (file)
@@ -1228,11 +1228,14 @@ static void rtl92c_dm_refresh_rate_adaptive_mask(struct ieee80211_hw *hw)
                        if (rtlhal->interface == INTF_PCI) {
                                rcu_read_lock();
                                sta = ieee80211_find_sta(mac->vif, mac->bssid);
+                               if (!sta)
+                                       goto out_unlock;
                        }
                        rtlpriv->cfg->ops->update_rate_tbl(hw, sta,
                                        p_ra->ratr_state);
 
                        p_ra->pre_ratr_state = p_ra->ratr_state;
+               out_unlock:
                        if (rtlhal->interface == INTF_PCI)
                                rcu_read_unlock();
                }