mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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: b616d9b0a7
("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>
This commit is contained in:
parent
4004a81828
commit
8b7d51249e
3 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue