diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2016-05-17 22:46:23 (GMT) |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-06-14 14:20:50 (GMT) |
commit | 6b3c33e985f20e7de07fc4b9b1a96dc452e37cb4 (patch) | |
tree | cfadef1c5ec642eebb1133b427eed964d70ffea0 | |
parent | 3fdbda446fbcd7fb750179c01338e81cf04e46c7 (diff) | |
download | linux-6b3c33e985f20e7de07fc4b9b1a96dc452e37cb4.tar.xz |
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>
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c index 445f681..c5ca9df 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c @@ -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) { |