From: Michal Simek <michal.simek@xilinx.com>
Date: Wed, 4 May 2016 13:08:00 +0000 (+0200)
Subject: spl: fit: Print error message when FDT is not present
X-Git-Tag: v2025.01-rc5-pxa1908~9439
X-Git-Url: http://git.dujemihanovic.xyz/%22/icons/right.gif/static/git-logo.png?a=commitdiff_plain;h=5adfa265793d2e41fd1619cafcd9cf4e18f80341;p=u-boot.git

spl: fit: Print error message when FDT is not present

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>
---

diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 1a5c0275a7..26842ba285 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -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;