]> git.sur5r.net Git - u-boot/blobdiff - env/ext4.c
rockchip: move CONFIG_ENV_SIZE and CONFIG_ENV_OFFSET to Kconfig
[u-boot] / env / ext4.c
index 5acdf0eda0dbb6d368622565237a87721ef0fc37..65202213d3a80328f1117e5153c6178cc957ca8e 100644 (file)
@@ -31,8 +31,6 @@
 #include <ext4fs.h>
 #include <mmc.h>
 
-env_t *env_ptr;
-
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef CONFIG_CMD_SAVEENV
@@ -77,7 +75,7 @@ static int env_ext4_save(void)
 }
 #endif /* CONFIG_CMD_SAVEENV */
 
-static void env_ext4_load(void)
+static int env_ext4_load(void)
 {
        ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE);
        struct blk_desc *dev_desc = NULL;
@@ -111,10 +109,12 @@ static void env_ext4_load(void)
        }
 
        env_import(buf, 1);
-       return;
+       return 0;
 
 err_env_relocate:
        set_default_env(NULL);
+
+       return -EIO;
 }
 
 U_BOOT_ENV_LOCATION(ext4) = {