]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
image-fdt: boot_get_fdt() return value when no DTB exists
authorNoam Camus <noamc@ezchip.com>
Wed, 22 Oct 2014 14:17:49 +0000 (17:17 +0300)
committerTom Rini <trini@ti.com>
Fri, 7 Nov 2014 21:27:05 +0000 (16:27 -0500)
I believe that when no DTB is around we should return 1.
This why I fixed such scenarious to not return zero anymore.
Else kernel might get NULL pointer to DTB which doesn't exists.

Signed-off-by: Noam Camus <noamc@ezchip.com>
common/image-fdt.c

index a2342fa3dfdd07c1de766200986cfac97579aa4d..a39ae1b4cce9f172dea99f9459f2320f6b98e8a7 100644 (file)
@@ -413,11 +413,11 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
                        }
                } else {
                        debug("## No Flattened Device Tree\n");
-                       return 0;
+                       goto error;
                }
        } else {
                debug("## No Flattened Device Tree\n");
-               return 0;
+               goto error;
        }
 
        *of_flat_tree = fdt_blob;