* [PATCH 1/1] rtlwifi: rtl8723be: avoid undefined behavior
@ 2016-05-17 22:46 Heinrich Schuchardt
[not found] ` <1463525183-11483-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2016-05-17 22:46 UTC (permalink / raw)
To: Larry Finger, Chaoming Li, Kalle Valo
Cc: linux-wireless, netdev, linux-kernel, Heinrich Schuchardt
Do not return undefined value for transmission power
if the rate is invalid.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] rtlwifi: rtl8723be: avoid undefined behavior
[not found] ` <1463525183-11483-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
@ 2016-05-18 12:12 ` Larry Finger
2016-06-14 14:20 ` [1/1] " Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Larry Finger @ 2016-05-18 12:12 UTC (permalink / raw)
To: Heinrich Schuchardt, Chaoming Li, Kalle Valo
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On 05/17/2016 05:46 PM, Heinrich Schuchardt wrote:
> Do not return undefined value for transmission power
> if the rate is invalid.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
> ---
> drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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) {
Did gcc give you a warning about this variable not being initialized? Mine does
not. In any case, this change is appropriate.
Acked-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Thanks,
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [1/1] rtlwifi: rtl8723be: avoid undefined behavior
[not found] ` <1463525183-11483-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2016-05-18 12:12 ` Larry Finger
@ 2016-06-14 14:20 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-06-14 14:20 UTC (permalink / raw)
To: Heinrich Schuchardt
Cc: Larry Finger, Chaoming Li, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Heinrich Schuchardt
Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org> wrote:
> Do not return undefined value for transmission power
> if the rate is invalid.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
> Acked-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Thanks, 1 patch applied to wireless-drivers-next.git:
6b3c33e985f2 rtlwifi: rtl8723be: avoid undefined behavior
--
Sent by pwcli
https://patchwork.kernel.org/patch/9115471/
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-14 14:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17 22:46 [PATCH 1/1] rtlwifi: rtl8723be: avoid undefined behavior Heinrich Schuchardt
[not found] ` <1463525183-11483-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2016-05-18 12:12 ` Larry Finger
2016-06-14 14:20 ` [1/1] " Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).