mtd/drivers/mtd/nand nand_base.c,1.131,1.132

Artem Bityuckiy dedekind at infradead.org
Wed Feb 9 09:50:00 EST 2005


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

Modified Files:
	nand_base.c 
Log Message:
Small bugfix. Sometimes it may be handy not to have bbt. So, this->bbt might be NULL.



Index: nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- nand_base.c	9 Feb 2005 12:19:56 -0000	1.131
+++ nand_base.c	9 Feb 2005 14:49:56 -0000	1.132
@@ -461,7 +461,8 @@
 	
 	/* Get block number */
 	block = ((int) ofs) >> this->bbt_erase_shift;
-	this->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1);
+	if (this->bbt)
+		this->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1);
 
 	/* Do we have a flash based bad block table ? */
 	if (this->options & NAND_USE_FLASH_BBT)





More information about the linux-mtd-cvs mailing list