mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
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>
This commit is contained in:
committed by
Tom Rini
parent
1d1af2ae5a
commit
76428561b3
@@ -472,12 +472,8 @@ static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
if (argc < 2)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
if (strcmp(argv[1], "detach") == 0) {
|
||||
if (argc < 2)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
if (strcmp(argv[1], "detach") == 0)
|
||||
return ubi_detach();
|
||||
}
|
||||
|
||||
if (strcmp(argv[1], "part") == 0) {
|
||||
const char *vid_header_offset = NULL;
|
||||
|
Reference in New Issue
Block a user