aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/nand.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/nand.c b/cmd/nand.c
index e10349ac2be..97f1619ffd6 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;
}