[U-Boot] [PATCH 1/5] ARM: uniphier: check return code of setenv()

Masahiro Yamada yamada.masahiro at socionext.com
Tue Jun 7 14:03:43 CEST 2016


Because setenv() may fail, it is better to check its return code.

Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
---

 arch/arm/mach-uniphier/board_late_init.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c
index 845f047..d9eeacb 100644
--- a/arch/arm/mach-uniphier/board_late_init.c
+++ b/arch/arm/mach-uniphier/board_late_init.c
@@ -56,9 +56,7 @@ static int uniphier_set_fdt_file(void)
 
 	strncat(dtb_name, ".dtb", buf_len);
 
-	setenv("fdt_file", dtb_name);
-
-	return 0;
+	return setenv("fdt_file", dtb_name);
 }
 
 int board_late_init(void)
-- 
1.9.1



More information about the U-Boot mailing list