From: Marek Szyprowski Date: Fri, 22 Jan 2021 11:27:31 +0000 (+0100) Subject: cmd: misc: Fix return value for the sleep command X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=54f884bb0b1ebc16946890bb8349fe0ca2455bb2;p=u-boot.git cmd: misc: Fix return value for the sleep command If sleeping has been interrupted, return CMD_RET_FAILURE instead of -1 (CMD_RET_USAGE). Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass Reviewed-by: Jaehoon Chung --- diff --git a/cmd/sleep.c b/cmd/sleep.c index f0c78a8efb..1fff400c79 100644 --- a/cmd/sleep.c +++ b/cmd/sleep.c @@ -40,7 +40,7 @@ static int do_sleep(struct cmd_tbl *cmdtp, int flag, int argc, while (get_timer(start) < delay) { if (ctrlc()) - return (-1); + return CMD_RET_FAILURE; udelay(100); }