diff options
author | Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | 2012-06-21 11:04:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-22 14:44:06 -0400 |
commit | 4b5237cc86872319a321ca1a694dee8866f7d9a3 (patch) | |
tree | be2a90ebdecdd5c05bd3409dd950ffb05eed7374 /drivers/net | |
parent | 81b67fd60a75cac36092aa37cd0728aab3a7a938 (diff) |
ath9k_hw: fix smatch warning in ar9003_hw_spur_mitigate_mrc_cck
drivers/net/wireless/ath/ath9k/ar9003_phy.c:211
ar9003_hw_spur_mitigate_mrc_cck() error: potential NULL dereference
'spur_fbin_ptr'.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index f1975b9e5393..6b91ebb158fe 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -173,7 +173,7 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah, | |||
173 | int cur_bb_spur, negative = 0, cck_spur_freq; | 173 | int cur_bb_spur, negative = 0, cck_spur_freq; |
174 | int i; | 174 | int i; |
175 | int range, max_spur_cnts, synth_freq; | 175 | int range, max_spur_cnts, synth_freq; |
176 | u8 *spur_fbin_ptr = NULL; | 176 | u8 *spur_fbin_ptr = ar9003_get_spur_chan_ptr(ah, IS_CHAN_2GHZ(chan)); |
177 | 177 | ||
178 | /* | 178 | /* |
179 | * Need to verify range +/- 10 MHz in control channel, otherwise spur | 179 | * Need to verify range +/- 10 MHz in control channel, otherwise spur |
@@ -181,8 +181,6 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah, | |||
181 | */ | 181 | */ |
182 | 182 | ||
183 | if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah)) { | 183 | if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah)) { |
184 | spur_fbin_ptr = ar9003_get_spur_chan_ptr(ah, | ||
185 | IS_CHAN_2GHZ(chan)); | ||
186 | if (spur_fbin_ptr[0] == 0) /* No spur */ | 184 | if (spur_fbin_ptr[0] == 0) /* No spur */ |
187 | return; | 185 | return; |
188 | max_spur_cnts = 5; | 186 | max_spur_cnts = 5; |