mtd/drivers/mtd/chips cfi_cmdset_0001.c,1.128,1.129

David Woodhouse dwmw2 at infradead.org
Mon Aug 11 06:37:07 EDT 2003


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

Modified Files:
	cfi_cmdset_0001.c 
Log Message:
Fix check for !map->virt case in point


Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- cfi_cmdset_0001.c	22 Jul 2003 13:23:38 -0000	1.128
+++ cfi_cmdset_0001.c	11 Aug 2003 10:37:04 -0000	1.129
@@ -494,12 +494,10 @@
 	int chipnum;
 	int ret = 0;
 
-	if (from + len > mtd->size)
+	if (!map->virt || (from + len > mtd->size))
 		return -EINVAL;
 	
 	*mtdbuf = (void *)map->virt + from;
-	if(*mtdbuf == NULL)
-		return -EINVAL; /* can not point this region */
 	*retlen = 0;
 
 	/* Now lock the chip(s) to POINT state */




More information about the linux-mtd-cvs mailing list