mtd/drivers/mtd mtdconcat.c,1.2,1.3

David Woodhouse dwmw2 at infradead.org
Tue May 21 17:04:28 EDT 2002


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

Modified Files:
	mtdconcat.c 
Log Message:
Don't call erase callback if it fails.


Index: mtdconcat.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdconcat.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mtdconcat.c	22 Mar 2002 08:45:22 -0000	1.2
+++ mtdconcat.c	21 May 2002 21:04:25 -0000	1.3
@@ -303,11 +303,14 @@
 		 */
 		erase->addr = 0;
 	}
+	kfree(erase);
+	if (err)
+		return err;
+
 	instr->state = MTD_ERASE_DONE;
 	if (instr->callback)
 		instr->callback(instr);
-	kfree(erase);
-	return err;
+	return 0;
 }
 
 static int concat_lock (struct mtd_info *mtd, loff_t ofs, size_t len)





More information about the linux-mtd-cvs mailing list