From 8b7d51249eca113c4965a7c417f33d7eb569434b Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Thu, 1 Sep 2016 17:31:31 -0500 Subject: 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 Cc: Lukasz Majewski Cc: Tony Lindgren Acked-by: Tony Lindgren --- drivers/dfu/dfu_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/dfu') diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c index 9fb874c0bc..23f15716e0 100644 --- a/drivers/dfu/dfu_nand.c +++ b/drivers/dfu/dfu_nand.c @@ -39,7 +39,7 @@ static int nand_block_op(enum dfu_op op, struct dfu_entity *dfu, if (nand_curr_device < 0 || nand_curr_device >= CONFIG_SYS_MAX_NAND_DEVICE || - !nand_info[nand_curr_device]->name) { + !nand_info[nand_curr_device]) { printf("%s: invalid nand device\n", __func__); return -1; } @@ -148,7 +148,7 @@ static int dfu_flush_medium_nand(struct dfu_entity *dfu) if (nand_curr_device < 0 || nand_curr_device >= CONFIG_SYS_MAX_NAND_DEVICE || - !nand_info[nand_curr_device]->name) { + !nand_info[nand_curr_device]) { printf("%s: invalid nand device\n", __func__); return -1; } -- cgit v1.2.3