]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rtlwifi: fix places where uninitialized data is used
authorAlessio Igor Bogani <abogani@kernel.org>
Mon, 28 Feb 2011 08:11:55 +0000 (09:11 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 28 Feb 2011 19:06:54 +0000 (14:06 -0500)
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c: In function ‘rtl92ce_rx_query_desc’:
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:255:5: warning: ‘rf_rx_num’ may be used uninitialized in this function
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:257:12: warning: ‘total_rssi’ may be used uninitialized in this function
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:466:6: warning: ‘weighting’ may be used uninitialized in this function

This work was supported by a hardware donation from the CE Linux Forum.

Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c

index e14f743673969a21effd070b157f5b1a5db2ef6f..aa2b5815600fa8a5db87f37f9fa1eb180bdd1941 100644 (file)
@@ -252,9 +252,9 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw,
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct phy_sts_cck_8192s_t *cck_buf;
        s8 rx_pwr_all, rx_pwr[4];
-       u8 rf_rx_num, evm, pwdb_all;
+       u8 evm, pwdb_all, rf_rx_num = 0;
        u8 i, max_spatial_stream;
-       u32 rssi, total_rssi;
+       u32 rssi, total_rssi = 0;
        bool is_cck_rate;
 
        is_cck_rate = RX_HAL_IS_CCK_RATE(pdesc);
@@ -463,7 +463,7 @@ static void _rtl92ce_update_rxsignalstatistics(struct ieee80211_hw *hw,
                                               struct rtl_stats *pstats)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
-       int weighting;
+       int weighting = 0;
 
        if (rtlpriv->stats.recv_signal_power == 0)
                rtlpriv->stats.recv_signal_power = pstats->recvsignalpower;