]> git.sur5r.net Git - u-boot/commitdiff
fsl: sys_eeprom: Fix 'may be used uninitialized' warning
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Tue, 1 Sep 2009 22:17:24 +0000 (02:17 +0400)
committerKumar Gala <galak@kernel.crashing.org>
Tue, 8 Sep 2009 14:10:03 +0000 (09:10 -0500)
The warning is bogus, so silence it by initializing the 'ret' variable.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
board/freescale/common/sys_eeprom.c

index c0fff686b1c9486854b0837cbc4f6b132cc51ee1..661015e0006f2afd7247f3397ac8cc3e8351b631 100644 (file)
@@ -204,7 +204,8 @@ static void update_crc(void)
  */
 static int prog_eeprom(void)
 {
-       int ret, i;
+       int ret = 0; /* shut up gcc */
+       int i;
        void *p;
 #ifdef CONFIG_SYS_EEPROM_BUS_NUM
        unsigned int bus;