]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: bootflow: remove dead code in do_bootflow_cmdline()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 11 Jan 2024 08:14:33 +0000 (09:14 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 19 Jan 2024 01:24:13 +0000 (20:24 -0500)
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 <heinrich.schuchardt@canonical.com>
cmd/bootflow.c

index cc6dfae16683a50b277e078458deb77d1ba624f9..be5d7d8e743aaf485682ce0b35e06c021782cebc 100644 (file)
@@ -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;
        }