summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorScott Wood <oss@buserror.net>2016-09-01 17:31:31 -0500
committerScott Wood <oss@buserror.net>2016-09-01 20:08:48 -0500
commit8b7d51249eca113c4965a7c417f33d7eb569434b (patch)
tree749d7b0e00f101c2873ef1c0ba00a2384537c59a /cmd
parent4004a81828c72311f9c310c38d903b3f6638465d (diff)
downloadu-boot-8b7d51249eca113c4965a7c417f33d7eb569434b.tar.gz
u-boot-8b7d51249eca113c4965a7c417f33d7eb569434b.tar.bz2
u-boot-8b7d51249eca113c4965a7c417f33d7eb569434b.zip
nand: Fix some more NULL name tests
Now that nand_info[] is an array of pointers we need to test the pointer itself rather than using name as a proxy for NULLness. Fixes: b616d9b0a708eb9 ("nand: Embed mtd_info in struct nand_chip") Signed-off-by: Scott Wood <oss@buserror.net> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Tony Lindgren <tony@atomide.com> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/nand.c b/cmd/nand.c
index c25e25af3d..c16ec77ed4 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -191,7 +191,7 @@ int do_nand_env_oob(cmd_tbl_t *cmdtp, int argc, char *const argv[])
struct mtd_info *mtd = nand_info[0];
char *cmd = argv[1];
- if (CONFIG_SYS_MAX_NAND_DEVICE == 0 || !mtd->name) {
+ if (CONFIG_SYS_MAX_NAND_DEVICE == 0 || !mtd) {
puts("no devices available\n");
return 1;
}