summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Wu <cooloney@gmail.com>2014-08-15 16:51:39 -0700
committerTom Rini <trini@ti.com>2014-08-21 12:01:30 -0400
commite6c88a6bbe50011acc5d9ba833526ce9676280ae (patch)
treeacea11da592dff201ac2fbd99d6769820f963159
parent6c454fedf5195e4160bd7aa398f7a4bb17d7157c (diff)
downloadu-boot-imx-e6c88a6bbe50011acc5d9ba833526ce9676280ae.zip
u-boot-imx-e6c88a6bbe50011acc5d9ba833526ce9676280ae.tar.gz
u-boot-imx-e6c88a6bbe50011acc5d9ba833526ce9676280ae.tar.bz2
bootm: make sure pass NULL when argc < 1
arg[0] might not be NULL even if argc < 1, so fix this as before. Signed-off-by: Bryan Wu <pengw@nvidia.com>
-rw-r--r--common/bootm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/bootm.c b/common/bootm.c
index 245c82a..ff81a27 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -731,8 +731,9 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc,
int os_noffset;
#endif
- img_addr = genimg_get_kernel_addr_fit(argv[0], &fit_uname_config,
- &fit_uname_kernel);
+ img_addr = genimg_get_kernel_addr_fit(argc < 1 ? NULL : argv[0],
+ &fit_uname_config,
+ &fit_uname_kernel);
bootstage_mark(BOOTSTAGE_ID_CHECK_MAGIC);