提交 b5ac5d7e 编写于 作者: P Petri T. Koistinen 提交者: 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: NAdrian Bunk <bunk@stusta.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: NDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 4d551465
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册