aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-05-04 02:16:39 -0400
committerKalle Valo <kvalo@codeaurora.org>2016-05-11 14:51:45 -0400
commit2f8514b8b03643a598706bf88214b10153324d11 (patch)
treea887bebdeb00585537524063de869f0c1d584df4 /drivers/net
parent30cfe9f61c2e78b55b33c780bc0a57f9adb00e62 (diff)
rtlwifi: rtl818x: silence uninitialized variable warning
What about if "rtlphy->pwrgroup_cnt" is 2? In that case we would use an uninitialized "chnlgroup" variable and probably crash. Maybe that can't happen for some reason which is not obvious but in that case this patch is harmless. Setting it to zero seems like a standard default in the surrounding code so it's probably fine here as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c
index 78a81c1e390b..9475aa2a8fa0 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c
@@ -208,8 +208,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw,
208 "Realtek regulatory, 40MHz, writeval = 0x%x\n", 208 "Realtek regulatory, 40MHz, writeval = 0x%x\n",
209 writeval); 209 writeval);
210 } else { 210 } else {
211 if (rtlphy->pwrgroup_cnt == 1) 211 chnlgroup = 0;
212 chnlgroup = 0;
213 212
214 if (rtlphy->pwrgroup_cnt >= 3) { 213 if (rtlphy->pwrgroup_cnt >= 3) {
215 if (chnl <= 3) 214 if (chnl <= 3)