On case 'fdt bootcpu' is invoked without parameters, argv[2] is not valid and this command would SEGFAULT in sandbox environment. Add missing argc test to avoid the crash and rather print usage help message.
Signed-off-by: Marek Vasut <marek.vasut+rene...@mailbox.org> Reviewed-by: Simon Glass <s...@chromium.org> --- Cc: Heinrich Schuchardt <heinrich.schucha...@canonical.com> Cc: Simon Glass <s...@chromium.org> Cc: Tom Rini <tr...@konsulko.com> --- V2: Add RB from Simon --- cmd/fdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) Applied to u-boot-dm/next, thanks!