提交 d6067f0e 编写于 作者: R Rajkumar Manoharan 提交者: John W. Linville

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 418378fe
......@@ -314,11 +314,9 @@ int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan)
if (!ath_prepare_reset(sc))
fastcc = false;
if (hchan) {
spin_lock_bh(&sc->chan_lock);
sc->cur_chandef = sc->cur_chan->chandef;
spin_unlock_bh(&sc->chan_lock);
}
spin_lock_bh(&sc->chan_lock);
sc->cur_chandef = sc->cur_chan->chandef;
spin_unlock_bh(&sc->chan_lock);
ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n",
hchan->channel, IS_CHAN_HT40(hchan), fastcc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册