summaryrefslogtreecommitdiff
path: root/common/cmd_scsi.c
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2008-07-10 12:05:32 -0500
committerJon Loeliger <jdl@freescale.com>2008-07-10 12:05:32 -0500
commit859f24350e6e4313626f85161dd03f025a4dac59 (patch)
treea025f68619045556e662326c8e1cbc147f9b633e /common/cmd_scsi.c
parent3473ab737282b08ad61841fcbb14c4d264a93a8e (diff)
parente0320b1ebec13755911a53b0af12cbf3e5e49a65 (diff)
downloadu-boot-imx-859f24350e6e4313626f85161dd03f025a4dac59.zip
u-boot-imx-859f24350e6e4313626f85161dd03f025a4dac59.tar.gz
u-boot-imx-859f24350e6e4313626f85161dd03f025a4dac59.tar.bz2
Merge commit 'wd/master'
Diffstat (limited to 'common/cmd_scsi.c')
-rw-r--r--common/cmd_scsi.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index 69028f3..e648f7d 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -212,7 +212,7 @@ int do_scsiboot (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
switch (argc) {
@@ -291,10 +291,6 @@ int do_scsiboot (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)) {
- puts ("** Bad FIT image format\n");
- return 1;
- }
puts ("Fit image detected...\n");
cnt = fit_get_size (fit_hdr);
@@ -317,8 +313,13 @@ int do_scsiboot (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)) {
+ puts ("** Bad FIT image format\n");
+ return 1;
+ }
+ fit_print_contents (fit_hdr);
+ }
#endif
/* Loading ok, update default load address */