Skip to contentSkip to conversation

drivers_mtd_maps_vmax301.c: fix off by one vmax_mtd

PATCH New Adrian Bunk 1 participant 1 message Mar 26, 2006 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers_mtd_maps_vmax301.c: fix off by one vmax_mtd

From: "Petri T. Koistinen" <[email protected]>

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

drivers/mtd/maps/vmax301.c +1 -1
@@ -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;
 	}