@@ -181,9 +181,7 @@ static int env_eeprom_load(void)
eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR,
off, (uchar *)buf_env, CONFIG_ENV_SIZE);
- env_import(buf_env, 1);
-
- return 0;
+ return env_import(buf_env, 1);
}
static int env_eeprom_save(void)
@@ -114,8 +114,7 @@ static int env_ext4_load(void)
goto err_env_relocate;
}
- env_import(buf, 1);
- return 0;
+ return env_import(buf, 1);
err_env_relocate:
set_default_env(NULL);
@@ -117,8 +117,7 @@ static int env_fat_load(void)
goto err_env_relocate;
}
- env_import(buf, 1);
- return 0;
+ return env_import(buf, 1);
err_env_relocate:
set_default_env(NULL);
@@ -351,9 +351,7 @@ static int env_flash_load(void)
"reading environment; recovered successfully\n\n");
#endif /* CONFIG_ENV_ADDR_REDUND */
- env_import((char *)flash_addr, 1);
-
- return 0;
+ return env_import((char *)flash_addr, 1);
}
#endif /* LOADENV */
@@ -332,8 +332,7 @@ static int env_mmc_load(void)
goto fini;
}
- env_import(buf, 1);
- ret = 0;
+ ret = env_import(buf, 1);
fini:
fini_mmc_for_env(mmc);
@@ -378,7 +378,7 @@ static int env_nand_load(void)
return -EIO;
}
- env_import(buf, 1);
+ return env_import(buf, 1);
#endif /* ! ENV_IS_EMBEDDED */
return 0;
@@ -60,9 +60,7 @@ static int env_nvram_load(void)
#else
memcpy(buf, (void *)CONFIG_ENV_ADDR, CONFIG_ENV_SIZE);
#endif
- env_import(buf, 1);
-
- return 0;
+ return env_import(buf, 1);
}
static int env_nvram_save(void)
@@ -49,7 +49,7 @@ static int env_remote_save(void)
static int env_remote_load(void)
{
#ifndef ENV_IS_EMBEDDED
- env_import((char *)env_ptr, 1);
+ return env_import((char *)env_ptr, 1);
#endif
return 0;
@@ -113,9 +113,7 @@ static void env_sata_load(void)
return -EIO;
}
- env_import(buf, 1);
-
- return 0;
+ return env_import(buf, 1);
}
U_BOOT_ENV_LOCATION(sata) = {
@@ -163,9 +163,7 @@ static int env_ubi_load(void)
return -EIO;
}
- env_import(buf, 1);
-
- return 0;
+ return env_import(buf, 1);
}
#endif /* CONFIG_SYS_REDUNDAND_ENVIRONMENT */