]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: bcb: Fix duplicated handling in two case-branches
authorEugeniu Rosca <roscaeugeniu@gmail.com>
Fri, 19 Jul 2019 21:26:12 +0000 (23:26 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 24 Jul 2019 17:16:29 +0000 (13:16 -0400)
Fix warning V1037 reported by PVS-Studio Static Analyzer:
Two or more case-branches perform the same actions. Check lines: 49, 53

Fixes: db7b7a05b267 ("cmd: Add 'bcb' command to read/modify/write BCB fields")
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
cmd/bcb.c

index 2bd5a744deb55a7b6f83c0dcc5dde57d48ba60ca..3b1c7434e28761e7cbebc2459e6005e0fd376a8a 100644 (file)
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -46,9 +46,6 @@ static int bcb_is_misused(int argc, char *const argv[])
 
        switch (cmd) {
        case BCB_CMD_LOAD:
-               if (argc != 3)
-                       goto err;
-               break;
        case BCB_CMD_FIELD_SET:
                if (argc != 3)
                        goto err;