test: storage: Fix board may not have devnum env
If the board do not have the 'devnum', the env_get() returns NULL and strcmp will lead to "data abort". Change-Id: I329237b61fc96bc90e7a07653b665192d6a9d7b8 Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
d0ff3d4548
commit
9c7862b8bf
|
|
@ -219,7 +219,7 @@ static int do_test_storage(cmd_tbl_t *cmdtp, int flag,
|
|||
}
|
||||
|
||||
/* 7. Switch back to default system devnum */
|
||||
if (devtype && !strcmp(devtype, "mmc") &&
|
||||
if (devtype && !strcmp(devtype, "mmc") && env_get("devnum") &&
|
||||
strcmp(devnum, env_get("devnum"))) {
|
||||
ret = run_command(cmd, 0);
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue