From: Heinrich Schuchardt Date: Thu, 11 Jan 2024 08:14:33 +0000 (+0100) Subject: cmd: bootflow: remove dead code in do_bootflow_cmdline() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=0afee2623d5a313473cb9b57df2fbadf54f86b82;p=u-boot.git cmd: bootflow: remove dead code in do_bootflow_cmdline() Checking argc < 3 twice is redundant. Addresses-Coverity-ID: 477198 Logically dead code Fixes: 921f63e57238 ("bootflow: Allow setting a cmdline arg with no value") Signed-off-by: Heinrich Schuchardt --- diff --git a/cmd/bootflow.c b/cmd/bootflow.c index cc6dfae166..be5d7d8e74 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -543,8 +543,6 @@ static int do_bootflow_cmdline(struct cmd_tbl *cmdtp, int flag, int argc, op = argv[1]; arg = argv[2]; if (*op == 's') { - if (argc < 3) - return CMD_RET_USAGE; val = argv[3] ?: (const char *)BOOTFLOWCL_EMPTY; }