Skip to content

Commit

Permalink
iwlegacy: add missing null check
Browse files Browse the repository at this point in the history
lq_sta has other null checks in this function.
assuming they are correct, this additional null check
should be added too.

Incorporating suggestion from Gustavo Padovan.

Signed-off-by: Greg Dietsche <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
farmergreg authored and linvjw committed Jun 3, 2011
1 parent 5c30c76 commit 0c34861
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/wireless/iwlegacy/iwl-4965-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2275,6 +2275,9 @@ iwl4965_rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
if (rate_control_send_low(sta, priv_sta, txrc))
return;

if (!lq_sta)
return;

rate_idx = lq_sta->last_txrate_idx;

if (lq_sta->last_rate_n_flags & RATE_MCS_HT_MSK) {
Expand Down

0 comments on commit 0c34861

Please sign in to comment.