summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-01-01 21:09:32 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2016-04-19 18:10:47 +0300
commitf286dd899b4f1445279af6b5965c335ae6f998f7 (patch)
tree0716a5ed97d9eaa50322b18de83b04d3a601471e /drivers/net/wireless/ath
parent7e247a9e88dc811d0b7b6a70af1d741054772bc4 (diff)
downloadlinux-f286dd899b4f1445279af6b5965c335ae6f998f7.tar.xz
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: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 639294a9e34d..6c5047cc837e 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -246,7 +246,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
struct ieee80211_conf *conf = &common->hw->conf;
bool fastcc;
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;
__be16 htc_mode;
u8 cmd_rsp;
@@ -274,10 +274,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
priv->ah->curchan->channel,
channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf),
fastcc);
-
- if (!fastcc)
- caldata = &priv->caldata;
-
+ caldata = fastcc ? NULL : &priv->caldata;
ret = ath9k_hw_reset(ah, hchan, caldata, fastcc);
if (ret) {
ath_err(common,