diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-01-06 12:26:28 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-01-15 15:28:44 -0500 |
commit | 76428561b343daafc163e4bf1d6b5e8f5454d63a (patch) | |
tree | 5749c7c6cecb360f01ad0360e18a393e27514efc /cmd | |
parent | 1d1af2ae5afe18d9ea7037201b241e963ac7307e (diff) | |
download | u-boot-76428561b343daafc163e4bf1d6b5e8f5454d63a.tar.gz u-boot-76428561b343daafc163e4bf1d6b5e8f5454d63a.tar.bz2 u-boot-76428561b343daafc163e4bf1d6b5e8f5454d63a.zip |
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>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/ubi.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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; |