[2.6 patch] drivers_mtd_maps_vmax301.c: fix off by one vmax_mtd

From: Adrian Bunk
Date: Sun Mar 26 2006 - 12:03:13 EST


From: "Petri T. Koistinen" <petri.koistinen@xxxxxx>

This patch fixes an obcious off-by-one error (vmax_mtd[] contains
two elements).

Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>

--- 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;
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/