mtd/drivers/mtd mtdblock.c,1.65,1.66

joern at infradead.org joern at infradead.org
Thu Nov 25 08:52:56 EST 2004


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

Modified Files:
	mtdblock.c 
Log Message:
Fix up slram and phram.



Index: mtdblock.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdblock.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- mtdblock.c	16 Nov 2004 18:28:59 -0000	1.65
+++ mtdblock.c	25 Nov 2004 13:52:52 -0000	1.66
@@ -248,7 +248,7 @@
 			      unsigned long block, char *buf)
 {
 	struct mtdblk_dev *mtdblk = mtdblks[dev->devnum];
-	if (unlikely(!mtdblk->cache_data)) {
+	if (unlikely(!mtdblk->cache_data && mtdblk->cache_size)) {
 		mtdblk->cache_data = vmalloc(mtdblk->mtd->erasesize);
 		if (!mtdblk->cache_data)
 			return -EINTR;





More information about the linux-mtd-cvs mailing list