From 35176ccb87d004eb803eb65ee21ba13c34e44604 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Mon, 29 Jun 2020 10:11:47 +0800 Subject: [PATCH] Revert "spl: fit: check image length" This reverts commit 359ed52cc25ad2538aba327e49570a2270e6d643. This early return causes variable "image_info" not initialized. spl_load_fit_image() should return 0 only at the end. Change-Id: I7dba24826758763e6e4da56579546cb50b9cb984 Signed-off-by: Joseph Chen --- common/spl/spl_fit.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 5d2ddfb7c7..7b30ad331b 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -204,9 +204,6 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, if (fit_image_get_data_size(fit, node, &len)) return -ENOENT; - if (!len) - return 0; - load_ptr = (load_addr + align_len) & ~align_len; #if defined(CONFIG_ARCH_ROCKCHIP) if ((load_ptr < CONFIG_SYS_SDRAM_BASE) || @@ -235,9 +232,6 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, debug("Embedded data: dst=%lx, size=%lx\n", load_addr, (unsigned long)length); src = (void *)data; - - if (!length) - return 0; } /* Check hashes and signature */