p54: avoid uninitialized variable warning for freq
authorJohn W. Linville <linville@tuxdriver.com>
Fri, 29 Apr 2011 19:09:39 +0000 (15:09 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 29 Apr 2011 19:25:46 +0000 (15:25 -0400)
  CC [M]  drivers/net/wireless/p54/eeprom.o
drivers/net/wireless/p54/eeprom.c: In function ‘p54_parse_rssical’:
drivers/net/wireless/p54/eeprom.c:494:8: warning: ‘freq’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/p54/eeprom.c

index 13d750da930119bc7bdfc4faf4ad322c6cf467e2..54cc0bba66b958ed88003b2cf256b76145c81d6a 100644 (file)
@@ -491,7 +491,7 @@ static int p54_parse_rssical(struct ieee80211_hw *dev,
                struct pda_rssi_cal_entry *cal = (void *) &data[offset];
 
                for (i = 0; i < entries; i++) {
-                       u16 freq;
+                       u16 freq = 0;
                        switch (i) {
                        case IEEE80211_BAND_2GHZ:
                                freq = 2437;