]> git.sur5r.net Git - u-boot/commitdiff
spl: fit: Print error message when FDT is not present
authorMichal Simek <michal.simek@xilinx.com>
Wed, 4 May 2016 13:08:00 +0000 (15:08 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 23 May 2016 15:50:20 +0000 (11:50 -0400)
When FDT is not present in the image user doesn't get any error what's
wrong. Print error message if LIBCOMMON_SUPPORT is enabled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Seris-cc: uboot
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/spl/spl_fit.c

index 1a5c0275a70c161257b79554cbc09fe8ed04ec3f..26842ba285cea51eeae81c73fd290300f447d6ab 100644 (file)
@@ -39,8 +39,13 @@ static int spl_fit_select_fdt(const void *fdt, int images, int *fdt_offsetp)
             node >= 0;
             node = fdt_next_subnode(fdt, node)) {
                name = fdt_getprop(fdt, node, "description", &len);
-               if (!name)
+               if (!name) {
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+                       printf("%s: Missing FDT description in DTB\n",
+                              __func__);
+#endif
                        return -EINVAL;
+               }
                if (board_fit_config_name_match(name))
                        continue;