From 0c34861e7c66435ab0986509ec20055c402f29d8 Mon Sep 17 00:00:00 2001 From: Greg Dietsche Date: Thu, 2 Jun 2011 22:24:06 -0500 Subject: [PATCH] iwlegacy: add missing null check 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 Signed-off-by: John W. Linville --- drivers/net/wireless/iwlegacy/iwl-4965-rs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-rs.c b/drivers/net/wireless/iwlegacy/iwl-4965-rs.c index 24d149909ba3..9b65153bdd01 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-rs.c @@ -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) { -- 2.39.5