[2.6 patch] drivers_mtd_maps_vmax301.c: fix off by one vmax_mtd
Adrian Bunk
bunk at stusta.de
Sun Mar 26 12:05:46 EST 2006
From: "Petri T. Koistinen" <petri.koistinen at iki.fi>
This patch fixes an obcious off-by-one error (vmax_mtd[] contains
two elements).
Signed-off-by: Adrian Bunk <bunk at stusta.de>
--- linux-2.6.14-rc3-git3/drivers/mtd/maps/vmax301.c 2005-05-25 13:48:53.000000000 +1000
+++ .6877.trivial/drivers/mtd/maps/vmax301.c 2005-10-04 19:29:50.000000000 +1000
@@ -182,7 +182,7 @@ int __init init_vmax301(void)
}
}
- if (!vmax_mtd[1] && !vmax_mtd[2]) {
+ if (!vmax_mtd[0] && !vmax_mtd[1]) {
iounmap((void *)iomapadr);
return -ENXIO;
}
More information about the linux-mtd
mailing list