The function spl_parse_image_header() falls back to a raw image
if the U-Boot header is missing and CONFIG_SPL_PANIC_ON_RAW_IMAGE
is undefined.  While, the bad magic checking here makes the
spl_parse_image_header() unreachable in case of the missing header.

Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com>
---

 common/spl/spl_mmc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index c27a250..df406e3 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -33,11 +33,6 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, 
unsigned long sector)
        if (count == 0)
                goto end;
 
-       if (image_get_magic(header) != IH_MAGIC) {
-               puts("bad magic\n");
-               return -1;
-       }
-
        spl_parse_image_header(header);
 
        /* convert size to sectors - round up */
-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to