From: Petri T. Koistinen Date: Fri, 31 Mar 2006 10:29:54 +0000 (-0800) Subject: [PATCH] drivers/mtd/maps/vmax301.c: fix off by one vmax_mtd X-Git-Tag: v2.6.17-rc1~129 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5ac5d7edb64b3ca1a489b30d95d62492a1f0b80;p=linux-2.6 [PATCH] drivers/mtd/maps/vmax301.c: fix off by one vmax_mtd Fix an obvious off-by-one error (vmax_mtd[] contains two elements). Signed-off-by: Adrian Bunk Cc: Thomas Gleixner Acked-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/mtd/maps/vmax301.c b/drivers/mtd/maps/vmax301.c index e0063941c0..b3e4873954 100644 --- a/drivers/mtd/maps/vmax301.c +++ b/drivers/mtd/maps/vmax301.c @@ -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; }