From: Noam Camus Date: Wed, 22 Oct 2014 14:17:49 +0000 (+0300) Subject: image-fdt: boot_get_fdt() return value when no DTB exists X-Git-Tag: v2015.01-rc1~28 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c6150aaf2f2745141a7c2ceded58d7efbfeace7d;p=u-boot image-fdt: boot_get_fdt() return value when no DTB exists 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 --- diff --git a/common/image-fdt.c b/common/image-fdt.c index a2342fa3df..a39ae1b4cc 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -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;