net: wireless: rt2x00: rt2x00mac.c: Cleaning up uninitialized variables
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sun, 1 Jun 2014 12:44:13 +0000 (14:44 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 19 Jun 2014 19:49:14 +0000 (15:49 -0400)
There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00mac.c

index 212ac48..6718362 100644 (file)
@@ -799,6 +799,8 @@ int rt2x00mac_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
 
        setup.tx = tx_ant;
        setup.rx = rx_ant;
+       setup.rx_chain_num = 0;
+       setup.tx_chain_num = 0;
 
        rt2x00lib_config_antenna(rt2x00dev, setup);