Skip to contentSkip to conversation

Patch: trivial fix to sa1100-flash.c

PATCH John Hall 1 participant 1 message Feb 23, 2004 Memory technology devices (MTD)

lore
Share & tools
lore

John Hall

author
#0 lore raw

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

drivers/mtd/maps/sa1100-flash.c Fri Feb 20 16:32:44 2004 renamed from drivers/mtd/maps/sa1100-flash.c Wed Feb 11 10:04:01 2004 +1 -1
@@ -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)