X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=common%2Fcmd_ide.c;h=97a873d1c96a517f3e96db09038f44f1ea421083;hb=b223017f081d7e0daa33ad17a3cd05b0c1f7d9ba;hp=65607022eb47c9bb2e8f418dd8ea96323e1647a7;hpb=1a247ba7fa5fb09f56892a09a990f03ce564b3e2;p=platform%2Fkernel%2Fu-boot.git diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 6560702..97a873d 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -367,7 +367,7 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) image_header_t *hdr; int rcode = 0; #if defined(CONFIG_FIT) - const void *fit_hdr; + const void *fit_hdr = NULL; #endif show_boot_progress (41); @@ -465,12 +465,6 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *)addr; - if (!fit_check_format (fit_hdr)) { - show_boot_progress (-140); - puts ("** Bad FIT image format\n"); - return 1; - } - show_boot_progress (141); puts ("Fit image detected...\n"); cnt = fit_get_size (fit_hdr); @@ -496,8 +490,15 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) /* This cannot be done earlier, we need complete FIT image in RAM first */ - if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) - fit_print_contents ((const void *)addr); + if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { + if (!fit_check_format (fit_hdr)) { + show_boot_progress (-140); + puts ("** Bad FIT image format\n"); + return 1; + } + show_boot_progress (141); + fit_print_contents (fit_hdr); + } #endif /* Loading ok, update default load address */