diff options
author | Shenlin Liang <liangshenlin@eswincomputing.com> | 2022-12-09 12:17:43 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-11 19:54:50 +0300 |
commit | 5b333b932495ff4348978f93ef273c73de99b7d2 (patch) | |
tree | 01609b84fe7b2f59268dff5f322e99f1d1f54114 /cmd | |
parent | 6762c8dd890f1e0b70822bd9b59a9003476dad2e (diff) | |
download | u-boot-5b333b932495ff4348978f93ef273c73de99b7d2.tar.xz |
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>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mvebu/comphy_rx_training.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/mvebu/comphy_rx_training.c b/cmd/mvebu/comphy_rx_training.c index 25a9e153de..4ee8f54ea9 100644 --- a/cmd/mvebu/comphy_rx_training.c +++ b/cmd/mvebu/comphy_rx_training.c @@ -22,7 +22,7 @@ int mvebu_comphy_rx_training_cmd(struct cmd_tbl *cmdtp, int flag, int argc, if (argc != 3) { printf("missing arguments\n"); - return -1; + return CMD_RET_USAGE; } cp_index = hextoul(argv[1], NULL); |