Commit 76428561b343daafc163e4bf1d6b5e8f5454d63a

Authored by Heinrich Schuchardt
Committed by Tom Rini
1 parent 1d1af2ae5a

cmd: ubi: remove unreachable code

It does not make sense to check if argc < 2 a second time, especially after
accessing argv[1].

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Showing 1 changed file with 1 additions and 5 deletions Side-by-side Diff

... ... @@ -472,12 +472,8 @@
472 472 if (argc < 2)
473 473 return CMD_RET_USAGE;
474 474  
475   - if (strcmp(argv[1], "detach") == 0) {
476   - if (argc < 2)
477   - return CMD_RET_USAGE;
478   -
  475 + if (strcmp(argv[1], "detach") == 0)
479 476 return ubi_detach();
480   - }
481 477  
482 478 if (strcmp(argv[1], "part") == 0) {
483 479 const char *vid_header_offset = NULL;