提交 76428561 编写于 作者: H Heinrich Schuchardt 提交者: Tom Rini

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: NHeinrich Schuchardt <xypron.glpk@gmx.de>
上级 1d1af2ae
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册