mtd/drivers/mtd/maps sharpsl-flash.c,1.4,1.5

rpurdie at infradead.org rpurdie at infradead.org
Mon Mar 21 03:42:14 EST 2005


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

Modified Files:
	sharpsl-flash.c 
Log Message:
sharpsl-flash: Correct error paths

Index: sharpsl-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/sharpsl-flash.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sharpsl-flash.c	21 Mar 2005 05:50:04 -0000	1.4
+++ sharpsl-flash.c	21 Mar 2005 08:42:11 -0000	1.5
@@ -85,8 +85,11 @@
 	} else if (machine_is_spitz()) {
 		sharpsl_partitions[0].size=0x006b0000;
 		sharpsl_partitions[0].offset=0x00140000;
-	} else 
-	    return -ENODEV;
+	} else {
+		map_destroy(mymtd);
+		iounmap(sharpsl_map.virt);	
+		return -ENODEV;
+	}
 	
 	parts = sharpsl_partitions;
 	nb_parts = NB_OF(sharpsl_partitions);





More information about the linux-mtd-cvs mailing list