Patch: trivial fix to sa1100-flash.c

John Hall john-news2 at cambridgetechgroup.com
Mon Feb 23 04:33:09 EST 2004


Hi,

I found a trivial off-by-one bug in the exit code of sa1100-flash.c. I only
found it because I cut and pasted some of the code when debugging elsewhere.

Regards,
John

--- mtd/drivers/mtd/maps/sa1100-flash.c Wed Feb 11 10:04:01 2004
+++ mtd-jdh/drivers/mtd/maps/sa1100-flash.c Fri Feb 20 16:32:44 2004
@@ -1027,7 +1027,7 @@
   mtd_concat_destroy(mtd);
 #endif

- for (i = NR_SUBMTD; i >= 0; i--) {
+ for (i = NR_SUBMTD - 1; i >= 0; i--) {
   if (sa[i].mtd)
    map_destroy(sa[i].mtd);
   if (sa[i].vbase)







More information about the linux-mtd mailing list