1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

env: make env_import(_redund) return 0 on success, not 1

env_import (and env_import_redund) currently return 1 on success
and 0 on error. However, they are only used from functions
returning 0 on success or a negative value on error.

Let's clean this up by making env_import and env_import_redund
return 0 on success and -EIO on error (as was the case for all
users before).

Users that cared for the return value are also updated. Funny
enough, this only affects onenand.c and sf.c

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
This commit is contained in:
Simon Goldschmidt
2018-01-31 14:47:10 +01:00
committed by Tom Rini
parent 87c7fb396a
commit 42a1820bbc
3 changed files with 8 additions and 8 deletions

4
env/onenand.c vendored
View File

@@ -57,10 +57,10 @@ static int env_onenand_load(void)
#endif /* !ENV_IS_EMBEDDED */
rc = env_import(buf, 1);
if (rc)
if (!rc)
gd->env_valid = ENV_VALID;
return rc ? 0 : -EIO;
return rc;
}
static int env_onenand_save(void)