Browse Source

fsl: sys_eeprom: Fix 'may be used uninitialized' warning

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>
Anton Vorontsov 15 years ago
parent
commit
9c671e7062
1 changed files with 2 additions and 1 deletions
  1. 2 1
      board/freescale/common/sys_eeprom.c

+ 2 - 1
board/freescale/common/sys_eeprom.c

@@ -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;