[U-Boot] [PATCH 1/2] env: Don't print "Failed" error message

Sam Protsenko semen.protsenko at linaro.org
Fri Jul 20 13:14:20 UTC 2018


"Failed" error message from env_load() only clutters the log with
unnecessary details, as we already have all needed warnings by that
time. Example:

    Loading Environment from FAT... MMC: no card present
    ** Bad device mmc 0 **
    Failed (-5)

Remove this "Failed" message to keep log short and clear.

Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
---
 env/env.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/env/env.c b/env/env.c
index 5c0842ac07..3ab4ec4237 100644
--- a/env/env.c
+++ b/env/env.c
@@ -196,9 +196,7 @@ int env_load(void)
 
 		printf("Loading Environment from %s... ", drv->name);
 		ret = drv->load();
-		if (ret)
-			printf("Failed (%d)\n", ret);
-		else
+		if (!ret)
 			printf("OK\n");
 
 		if (!ret)
-- 
2.18.0



More information about the U-Boot mailing list