diff mbox

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

Message ID 0f4720821238503a73586589e57b7c6d6c6d010c.1438787144.git.marcel.ziswiler@toradex.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Marcel Ziswiler Aug. 5, 2015, 3:17 p.m. UTC
From: Max Krummenacher <max.krummenacher@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@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Simon Glass <sjg@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(-)

Comments

Tom Rini Aug. 13, 2015, 1:23 p.m. UTC | #1
On Wed, Aug 05, 2015 at 05:17:03PM +0200, Marcel Ziswiler wrote:

> From: Max Krummenacher <max.krummenacher@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@toradex.com>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> Acked-by: Marek Vasut <marex@denx.de>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

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;