net: wireless/rtlwifi: fix uninitialized variable issue
authorCong Ding <dinggnu@gmail.com>
Mon, 4 Feb 2013 21:43:22 +0000 (22:43 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 8 Feb 2013 19:51:31 +0000 (14:51 -0500)
The use of variable packet_beacon might be uninitialized in the two files,
which is same as this patch:
https://patchwork.kernel.org/patch/2006711/

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c

index c31795e379f7e16a1a5a208f10af3d994eff3b66..da0e9022a99a5bb5a8e7eae5227f3ed7c00c1e08 100644 (file)
@@ -488,7 +488,7 @@ static void _rtl92ce_translate_rx_signal_stuff(struct ieee80211_hw *hw,
        u8 *praddr;
        __le16 fc;
        u16 type, c_fc;
-       bool packet_matchbssid, packet_toself, packet_beacon;
+       bool packet_matchbssid, packet_toself, packet_beacon = false;
 
        tmp_buf = skb->data + pstats->rx_drvinfo_size + pstats->rx_bufshift;
 
index 32ff959a0251bdf36cb69122b55a6fc438e3bdd0..85b6bdb163c0faa04103f03d87a05900d850c270 100644 (file)
@@ -1084,7 +1084,7 @@ void rtl92c_translate_rx_signal_stuff(struct ieee80211_hw *hw,
        u8 *praddr;
        __le16 fc;
        u16 type, cpu_fc;
-       bool packet_matchbssid, packet_toself, packet_beacon;
+       bool packet_matchbssid, packet_toself, packet_beacon = false;
 
        tmp_buf = skb->data + pstats->rx_drvinfo_size + pstats->rx_bufshift;
        hdr = (struct ieee80211_hdr *)tmp_buf;