]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
env_sf: remove warning introduced with last patch
authorStefano Babic <sbabic@denx.de>
Fri, 29 Oct 2010 09:49:45 +0000 (11:49 +0200)
committerWolfgang Denk <wd@denx.de>
Fri, 29 Oct 2010 21:07:59 +0000 (23:07 +0200)
Signed-off-by: Stefano Babic <sbabic@denx.de>
common/env_sf.c

index a597b24dcb35213c00eabedc73481219015bffe8..47c6a7066543d14ec01253b6067ee8266856abd2 100644 (file)
@@ -272,7 +272,7 @@ int saveenv(void)
        u32 saved_size, saved_offset;
        char *saved_buffer = NULL;
        u32 sector = 1;
-       int ret;
+       int ret = 1;
        env_t   env_new;
        char    *res;
        ssize_t len;
@@ -293,7 +293,6 @@ int saveenv(void)
                saved_offset = CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE;
                saved_buffer = malloc(saved_size);
                if (!saved_buffer) {
-                       ret = 1;
                        goto done;
                }
                ret = spi_flash_read(env_flash, saved_offset,