diff options
author | Rajkumar Manoharan <rmanohar@qti.qualcomm.com> | 2014-06-20 13:17:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-20 14:13:46 -0400 |
commit | d6067f0e17eb1de7d9b1d792f67d17c6e894b770 (patch) | |
tree | ca719665fa6e20e381bc80c3f21ec6bae91fff87 /drivers | |
parent | 418378fed0506b5ec0b43c03bc11929ec1f88073 (diff) |
ath9k: Fix build error in ath_reset_internal
drivers/net/wireless/ath/ath9k/main.c:299 ath_reset_internal()
error: we previously assumed 'hchan' could be null (see line 293)
Cc: Felix Fietkau <nbd@openwrt.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index cf21652835c1..83cb39efb636 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -314,11 +314,9 @@ int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan) | |||
314 | if (!ath_prepare_reset(sc)) | 314 | if (!ath_prepare_reset(sc)) |
315 | fastcc = false; | 315 | fastcc = false; |
316 | 316 | ||
317 | if (hchan) { | 317 | spin_lock_bh(&sc->chan_lock); |
318 | spin_lock_bh(&sc->chan_lock); | 318 | sc->cur_chandef = sc->cur_chan->chandef; |
319 | sc->cur_chandef = sc->cur_chan->chandef; | 319 | spin_unlock_bh(&sc->chan_lock); |
320 | spin_unlock_bh(&sc->chan_lock); | ||
321 | } | ||
322 | 320 | ||
323 | ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n", | 321 | ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n", |
324 | hchan->channel, IS_CHAN_HT40(hchan), fastcc); | 322 | hchan->channel, IS_CHAN_HT40(hchan), fastcc); |