Skip to content
Snippets Groups Projects
Commit e6c88a6b authored by Bryan Wu's avatar Bryan Wu Committed by Tom Rini
Browse files

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: default avatarBryan Wu <pengw@nvidia.com>
parent 6c454fed
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment