mtd/drivers/mtd/nand nand.c,1.56,1.57

David Woodhouse dwmw2 at infradead.org
Wed Oct 15 09:23:59 EDT 2003


Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv9413

Modified Files:
	nand.c 
Log Message:
Abort if no chip found


Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- nand.c	23 Jul 2003 14:23:15 -0000	1.56
+++ nand.c	15 Oct 2003 13:23:56 -0000	1.57
@@ -1388,6 +1388,11 @@
 		}
 	}
 
+	if (!mtd->name) {
+		printk (KERN_WARNING "No NAND device found!!!\n");
+		return 1;
+	}
+
 	for (i=1; i < maxchips; i++) {
 		this->select_chip(mtd, i);
 
@@ -1451,12 +1456,6 @@
 
 	/* De-select the device */
 	this->select_chip(mtd, -1);
-
-	/* Print warning message for no device */
-	if (!mtd->size) {
-		printk (KERN_WARNING "No NAND device found!!!\n");
-		return 1;
-	}
 
 	/* Fill in remaining MTD driver data */
 	mtd->type = MTD_NANDFLASH;




More information about the linux-mtd-cvs mailing list