From 5b333b932495ff4348978f93ef273c73de99b7d2 Mon Sep 17 00:00:00 2001 From: Shenlin Liang Date: Fri, 9 Dec 2022 17:17:43 +0800 Subject: 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 Reviewed-by: Simon Glass --- cmd/mvebu/comphy_rx_training.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') 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); -- cgit v1.2.3