cmd: change the return value when argc error

When the number of parameters is wrong, the return value should be processed in
the same way as other cmds, return CMD_RET_USAGE so that it can print the information.

Signed-off-by: Shenlin Liang <liangshenlin@eswincomputing.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Shenlin Liang 2022-12-09 17:17:43 +08:00 committed by Tom Rini
parent 6762c8dd89
commit 5b333b9324

View File

@ -22,7 +22,7 @@ int mvebu_comphy_rx_training_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
if (argc != 3) { if (argc != 3) {
printf("missing arguments\n"); printf("missing arguments\n");
return -1; return CMD_RET_USAGE;
} }
cp_index = hextoul(argv[1], NULL); cp_index = hextoul(argv[1], NULL);