[PATCH] drivers/mtd/maps/vmax301.c: fix off by one vmax_mtd
authorPetri T. Koistinen <petri.koistinen@iki.fi>
Fri, 31 Mar 2006 10:29:54 +0000 (02:29 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 31 Mar 2006 20:18:49 +0000 (12:18 -0800)
Fix an obvious off-by-one error (vmax_mtd[] contains two elements).

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/mtd/maps/vmax301.c

index e0063941c0df3090e71363c8325ef263d8d40ba8..b3e48739543551e6f506fcb362739262073e22e3 100644 (file)
@@ -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;
        }