diff mbox series

[U-Boot,v3,2/4] cmd: bcb: Fix duplicated handling in two case-branches

Message ID 20190719212614.25527-3-erosca@de.adit-jv.com
State Accepted
Commit e47b73b821f7f6078c0d11b453545507e25727cc
Delegated to: Tom Rini
Headers show
Series Fixes and improvements in BCB and Android docs [ver #3] | expand

Commit Message

Eugeniu Rosca July 19, 2019, 9:26 p.m. UTC
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>
---
v3:
 - No changes
 - Added 'Reviewed-by: Sam Protsenko' from v2

v2:
 - Added 'Reviewed-by: Igor Opaniuk' from v1
 - https://patchwork.ozlabs.org/patch/1131357/

v1:
 - https://patchwork.ozlabs.org/patch/1131301/
---
 cmd/bcb.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Tom Rini July 24, 2019, 8:08 p.m. UTC | #1
On Fri, Jul 19, 2019 at 11:26:12PM +0200, Eugeniu Rosca wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/cmd/bcb.c b/cmd/bcb.c
index 2bd5a744deb5..3b1c7434e287 100644
--- 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;