]> git.sur5r.net Git - u-boot/commitdiff
image-fdt.c: store returned error value
authorMax Krummenacher <max.krummenacher@toradex.com>
Wed, 5 Aug 2015 15:17:03 +0000 (17:17 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 13 Aug 2015 11:19:37 +0000 (07:19 -0400)
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>
common/image-fdt.c

index 80e3e63805cdca31ec0c780c45ab79c3ec601dc1..5180a03a61bfdeed9014b651bf83a4cb9ee0b4dc 100644 (file)
@@ -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;