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

Commit 2f8514b8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Kalle Valo
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 30cfe9f6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -208,7 +208,6 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw,
				 "Realtek regulatory, 40MHz, writeval = 0x%x\n",
				 writeval);
		} else {
			if (rtlphy->pwrgroup_cnt == 1)
			chnlgroup = 0;

			if (rtlphy->pwrgroup_cnt >= 3) {