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

Commit f286dd89 authored by Markus Elfring's avatar Markus Elfring Committed by Kalle Valo
Browse files

ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel()



Replace an explicit initialisation for one local variable at the beginning
by a conditional assignment.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarOleksij Rempel <linux@rempel-privat.de>
Reviewed-by: default avatarJulian Calaby <julian.calaby@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 7e247a9e
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -246,7 +246,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
	struct ieee80211_conf *conf = &common->hw->conf;
	struct ieee80211_conf *conf = &common->hw->conf;
	bool fastcc;
	bool fastcc;
	struct ieee80211_channel *channel = hw->conf.chandef.chan;
	struct ieee80211_channel *channel = hw->conf.chandef.chan;
	struct ath9k_hw_cal_data *caldata = NULL;
	struct ath9k_hw_cal_data *caldata;
	enum htc_phymode mode;
	enum htc_phymode mode;
	__be16 htc_mode;
	__be16 htc_mode;
	u8 cmd_rsp;
	u8 cmd_rsp;
@@ -274,10 +274,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
		priv->ah->curchan->channel,
		priv->ah->curchan->channel,
		channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf),
		channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf),
		fastcc);
		fastcc);

	caldata = fastcc ? NULL : &priv->caldata;
	if (!fastcc)
		caldata = &priv->caldata;

	ret = ath9k_hw_reset(ah, hchan, caldata, fastcc);
	ret = ath9k_hw_reset(ah, hchan, caldata, fastcc);
	if (ret) {
	if (ret) {
		ath_err(common,
		ath_err(common,