Commit 6b3c33e9 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Kalle Valo

rtlwifi: rtl8723be: avoid undefined behavior

Do not return undefined value for transmission power
if the rate is invalid.
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 3fdbda44
......@@ -1019,7 +1019,7 @@ static u8 _rtl8723be_get_txpower_index(struct ieee80211_hw *hw, u8 path,
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
u8 index = (channel - 1);
u8 txpower;
u8 txpower = 0;
u8 power_diff_byrate = 0;
if (channel > 14 || channel < 1) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment