Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6067f0e authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 418378fe
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -314,11 +314,9 @@ int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan)
	if (!ath_prepare_reset(sc))
	if (!ath_prepare_reset(sc))
		fastcc = false;
		fastcc = false;


	if (hchan) {
	spin_lock_bh(&sc->chan_lock);
	spin_lock_bh(&sc->chan_lock);
	sc->cur_chandef = sc->cur_chan->chandef;
	sc->cur_chandef = sc->cur_chan->chandef;
	spin_unlock_bh(&sc->chan_lock);
	spin_unlock_bh(&sc->chan_lock);
	}


	ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n",
	ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n",
		hchan->channel, IS_CHAN_HT40(hchan), fastcc);
		hchan->channel, IS_CHAN_HT40(hchan), fastcc);