diff options
author | Pontus Fuchs <pontus.fuchs@gmail.com> | 2012-11-05 15:17:51 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-14 14:55:41 -0500 |
commit | 9ee01b30fdc85a4ab5b0836ad98ac0ae5092fb4f (patch) | |
tree | 73745e7aec7c092b2efbdf5427dac5c48fe5a96a | |
parent | d01a303e68310695b6d08327454f4ad76a48716f (diff) |
ar5523: Don't dereference sta if NULL
A missing else caused a potential NULL dereference.
Reported-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ar5523/ar5523.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c index 4bd7714cd66a..7157f7d311c5 100644 --- a/drivers/net/wireless/ath/ar5523/ar5523.c +++ b/drivers/net/wireless/ath/ar5523/ar5523.c | |||
@@ -1196,8 +1196,8 @@ static void ar5523_create_rateset(struct ar5523 *ar, | |||
1196 | if (!sta) { | 1196 | if (!sta) { |
1197 | ar5523_info(ar, "STA not found. Cannot set rates\n"); | 1197 | ar5523_info(ar, "STA not found. Cannot set rates\n"); |
1198 | sta_rate_set = bss_conf->basic_rates; | 1198 | sta_rate_set = bss_conf->basic_rates; |
1199 | } | 1199 | } else |
1200 | sta_rate_set = sta->supp_rates[ar->hw->conf.channel->band]; | 1200 | sta_rate_set = sta->supp_rates[ar->hw->conf.channel->band]; |
1201 | 1201 | ||
1202 | ar5523_dbg(ar, "sta rate_set = %08x\n", sta_rate_set); | 1202 | ar5523_dbg(ar, "sta rate_set = %08x\n", sta_rate_set); |
1203 | 1203 | ||