diff mbox series

[U-Boot,v6,05/13] spl: fit: Do not fail immediately if an overlay is not available

Message ID 20191022143922.10205-6-jjhiblot@ti.com
State Accepted
Commit 24bf44cf88e7ee04c4bb962ede3c0e6462339c5e
Delegated to: Tom Rini
Headers show
Series Add support for applications of overlays in SPL | expand

Commit Message

Jean-Jacques Hiblot Oct. 22, 2019, 2:39 p.m. UTC
If one overlay that must be applied cannot be found in the FIT, the current
implementation stops applying the overlays. Let's make it skip only the
failing overlay instead.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 common/spl/spl_fit.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Tom Rini Jan. 8, 2020, 8:10 p.m. UTC | #1
On Tue, Oct 22, 2019 at 04:39:14PM +0200, Jean-Jacques Hiblot wrote:

> If one overlay that must be applied cannot be found in the FIT, the current
> implementation stops applying the overlays. Let's make it skip only the
> failing overlay instead.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index e6935c16b7..0245dcadb4 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -324,9 +324,13 @@  static int spl_fit_append_fdt(struct spl_image_info *spl_image,
 		for (; ; index++) {
 			node = spl_fit_get_image_node(fit, images, FIT_FDT_PROP,
 						      index);
-			if (node < 0) {
+			if (node == -E2BIG) {
 				debug("%s: No additional FDT node\n", __func__);
 				break;
+			} else if (node < 0) {
+				debug("%s: unable to find FDT node %d\n",
+				      __func__, index);
+				continue;
 			}
 
 			if (!tmpbuffer) {