summaryrefslogtreecommitdiff
path: root/common/cmd_fdc.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-07-07 09:51:25 +0200
committerStefan Roese <sr@denx.de>2008-07-07 09:51:25 +0200
commit7c6237b3e2f2ee0098897da39b79aff4642b8946 (patch)
treed768b7851bb688f543da0a3ed50c927a2bde2804 /common/cmd_fdc.c
parentdd1c5523d6f44e842e69f2fcb50788c6060eab86 (diff)
parentc956717ab25c962ef49d49064dfc73f4edcba1fb (diff)
downloadu-boot-imx-7c6237b3e2f2ee0098897da39b79aff4642b8946.zip
u-boot-imx-7c6237b3e2f2ee0098897da39b79aff4642b8946.tar.gz
u-boot-imx-7c6237b3e2f2ee0098897da39b79aff4642b8946.tar.bz2
Merge branch 'master' of /home/stefan/git/u-boot/u-boot
Diffstat (limited to 'common/cmd_fdc.c')
-rw-r--r--common/cmd_fdc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c
index 0293d18..e4fbf29 100644
--- a/common/cmd_fdc.c
+++ b/common/cmd_fdc.c
@@ -787,7 +787,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
char *ep;
int rcode = 0;
#if defined(CONFIG_FIT)
- const void *fit_hdr;
+ const void *fit_hdr = NULL;
#endif
switch (argc) {
@@ -847,10 +847,6 @@ int do_fdcboot (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");
imsize = fit_get_size (fit_hdr);
@@ -879,8 +875,13 @@ int do_fdcboot (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 */