]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: uniphier: check return code of setenv()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 7 Jun 2016 12:03:43 +0000 (21:03 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 8 Jun 2016 23:18:25 +0000 (08:18 +0900)
Because setenv() may fail, it is better to check its return code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/mach-uniphier/board_late_init.c

index 845f047b027da675425f70f1d7bf548b28e2e549..d9eeacbf3a61639f216626b191b34677d11cb4c9 100644 (file)
@@ -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)