[U-Boot] [PATCH v5] image-fdt.c: store returned error value

Marcel Ziswiler marcel at ziswiler.com
Tue Aug 4 08:57:39 CEST 2015


From: Max Krummenacher <max.krummenacher at toradex.com>

This fixes the following warning (and the runtime error reporting):
../common/image-fdt.c:491:4: warning: 'fdt_ret' may be used
uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Max Krummenacher <max.krummenacher at toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>
Acked-by: Marek Vasut <marex at denx.de>
Acked-by: Simon Glass <sjg at chromium.org>
---
Changes in v5: split up into separate patches to be picked up by the
various subsystem maintainers as suggested by Marek
Changes in v2: run it through checkpatch.pl and replace spaces with tab

 common/image-fdt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/image-fdt.c b/common/image-fdt.c
index 80e3e63..5180a03 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -492,7 +492,8 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
 		}
 	}
 	if (IMAGE_OF_SYSTEM_SETUP) {
-		if (ft_system_setup(blob, gd->bd)) {
+		fdt_ret = ft_system_setup(blob, gd->bd);
+		if (fdt_ret) {
 			printf("ERROR: system-specific fdt fixup failed: %s\n",
 			       fdt_strerror(fdt_ret));
 			goto err;
-- 
2.4.3



More information about the U-Boot mailing list