ath: Fix uninitialized variable warnings
authorPrarit Bhargava <prarit@redhat.com>
Thu, 27 May 2010 18:14:54 +0000 (14:14 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Jun 2010 19:14:53 +0000 (15:14 -0400)
Fixes 'make -j24 CONFIG_DEBUG_SECTION_MISMATCH=y' warning:

drivers/net/wireless/ath/ath9k/eeprom_4k.c: In function ‘ath9k_hw_get_4k_gain_boundaries_pdadcs.clone.1’:
drivers/net/wireless/ath/ath9k/eeprom_4k.c:311: error: ‘minPwrT4’ may be used uninitialized in this function
drivers/net/wireless/ath/ath9k/eeprom_9287.c: In function ‘ath9k_hw_get_AR9287_gain_boundaries_pdadcs’:
drivers/net/wireless/ath/ath9k/eeprom_9287.c:302: error: ‘minPwrT4’ may be used uninitialized in this function
drivers/net/wireless/ath/ath9k/eeprom_def.c: In function ‘ath9k_hw_get_def_gain_boundaries_pdadcs.clone.0’:
drivers/net/wireless/ath/ath9k/eeprom_def.c:679: error: ‘minPwrT4’ may be used uninitialized in this function

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/eeprom_4k.c
drivers/net/wireless/ath/ath9k/eeprom_9287.c
drivers/net/wireless/ath/ath9k/eeprom_def.c

index 41a77d1bd43981a4e39a3b40bae55c2a1ae63664..e25a2abbf5619a01986c1105ab31b82a88b1da3c 100644 (file)
@@ -249,6 +249,7 @@ static void ath9k_hw_get_4k_gain_boundaries_pdadcs(struct ath_hw *ah,
        struct chan_centers centers;
 #define PD_GAIN_BOUNDARY_DEFAULT 58;
 
+       memset(&minPwrT4, 0, AR9287_NUM_PD_GAINS);
        ath9k_hw_get_channel_centers(ah, chan, &centers);
 
        for (numPiers = 0; numPiers < availPiers; numPiers++) {
index 5f3b20b54d352c78e2a79a2b8775e76d550ee835..39a41053705f4c849729d5f4451a8ad35228ac62 100644 (file)
@@ -250,6 +250,7 @@ static void ath9k_hw_get_ar9287_gain_boundaries_pdadcs(struct ath_hw *ah,
        static u8 vpdTableI[AR5416_EEP4K_NUM_PD_GAINS]
                [AR5416_MAX_PWR_RANGE_IN_HALF_DB];
 
+       memset(&minPwrT4, 0, AR9287_NUM_PD_GAINS);
        ath9k_hw_get_channel_centers(ah, chan, &centers);
 
        for (numPiers = 0; numPiers < availPiers; numPiers++) {
index 7e1ed78d0e64b0ec63006a8ef751a253628da249..77b1433312ccab88d08b45d0a1f799582a6c99a7 100644 (file)
@@ -617,6 +617,7 @@ static void ath9k_hw_get_def_gain_boundaries_pdadcs(struct ath_hw *ah,
        int16_t minDelta = 0;
        struct chan_centers centers;
 
+       memset(&minPwrT4, 0, AR9287_NUM_PD_GAINS);
        ath9k_hw_get_channel_centers(ah, chan, &centers);
 
        for (numPiers = 0; numPiers < availPiers; numPiers++) {