Commit b5ac5d7e authored by Petri T. Koistinen's avatar Petri T. Koistinen Committed by Linus Torvalds

[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: default avatarAdrian Bunk <bunk@stusta.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4d551465
...@@ -182,7 +182,7 @@ int __init init_vmax301(void) ...@@ -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); iounmap((void *)iomapadr);
return -ENXIO; return -ENXIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment