rtlwifi: Fix some warnings/bugs
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 2 Apr 2011 23:10:22 +0000 (18:10 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 Apr 2011 19:22:13 +0000 (15:22 -0400)
Some compiler/architecture combinations generate some warnings that are
not seen on my main system. Two of the "warnings" about unitialized variables
are really bugs.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/efuse.c
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
drivers/net/wireless/rtlwifi/usb.c

index f74a8701c67ddfc5fcb28724b673b97c9a29d64d..590f14f45a8900cf2c7eba2c1c4a1885fe570a48 100644 (file)
@@ -685,7 +685,7 @@ static int efuse_pg_packet_read(struct ieee80211_hw *hw, u8 offset, u8 *data)
 
        u8 efuse_data, word_cnts = 0;
        u16 efuse_addr = 0;
-       u8 hworden;
+       u8 hworden = 0;
        u8 tmpdata[8];
 
        if (data == NULL)
index 5ef91374b230924dbd52be91d3be9d09ff963ea0..28a6ce3bc239612ef7834115f05b0688766438f4 100644 (file)
@@ -303,7 +303,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw,
        u16 box_reg, box_extreg;
        u8 u1b_tmp;
        bool isfw_read = false;
-       u8 buf_index;
+       u8 buf_index = 0;
        bool bwrite_sucess = false;
        u8 wait_h2c_limmit = 100;
        u8 wait_writeh2c_limmit = 100;
index a4b2613d6a8c205deee0af697b00f6882cd57213..f5d85735d6420d350b1e3376b506bbdad5b95a75 100644 (file)
@@ -246,7 +246,7 @@ static void _rtl_usb_io_handler_init(struct device *dev,
 
 static void _rtl_usb_io_handler_release(struct ieee80211_hw *hw)
 {
-       struct rtl_priv *rtlpriv = rtl_priv(hw);
+       struct rtl_priv __maybe_unused *rtlpriv = rtl_priv(hw);
 
        mutex_destroy(&rtlpriv->io.bb_mutex);
 }