linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: fix the wrong check condition
@ 2012-02-15 10:33 Huang Shijie
  2012-02-16  2:59 ` Brian Norris
  0 siblings, 1 reply; 8+ messages in thread
From: Huang Shijie @ 2012-02-15 10:33 UTC (permalink / raw)
  To: linux-arm-kernel

If we use `||` check condition, many NAND chips which are not
ONFI nands have to do the ONFI detection.

Use `&&` here to detect the ONFI NAND when we can not find any type
in the nand_flash_ids.

Signed-off-by: Huang Shijie <b32955@freescale.com>
---
 drivers/mtd/nand/nand_base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 8a393f9..90020a5 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2966,7 +2966,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
 			break;
 
 	chip->onfi_version = 0;
-	if (!type->name || !type->pagesize) {
+	if (!type->name && !type->pagesize) {
 		/* Check is chip is ONFI compliant */
 		ret = nand_flash_detect_onfi(mtd, chip, &busw);
 		if (ret)
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-18  5:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-15 10:33 [PATCH] mtd: fix the wrong check condition Huang Shijie
2012-02-16  2:59 ` Brian Norris
2012-02-16  3:15   ` Huang Shijie
2012-02-16  8:32     ` Brian Norris
     [not found]   ` <4F3C7433.5030306@freescale.com>
2012-02-16 11:04     ` Florian Fainelli
2012-02-17  3:07       ` Huang Shijie
2012-02-17  8:50         ` Florian Fainelli
2012-02-18  5:43           ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).