diff --git a/cmd/nand.c b/cmd/nand.c index e10349a..97f1619 100644 --- a/cmd/nand.c +++ b/cmd/nand.c @@ -115,8 +115,7 @@ free_dat: static int set_dev(int dev) { - if (dev < 0 || dev >= CONFIG_SYS_MAX_NAND_DEVICE || - !nand_info[dev]->name) { + if (dev < 0 || dev >= CONFIG_SYS_MAX_NAND_DEVICE || !nand_info[dev]) { puts("No such device\n"); return -1; }