From 0afee2623d5a313473cb9b57df2fbadf54f86b82 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 11 Jan 2024 09:14:33 +0100 Subject: [PATCH] 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 --- cmd/bootflow.c | 2 -- 1 file changed, 2 deletions(-) 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; } -- 2.39.5