mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
rtlwifi: rtl8723be: avoid undefined behavior
Do not return undefined value for transmission power if the rate is invalid. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
3fdbda446f
commit
6b3c33e985
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue