[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 <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>
This commit is contained in:
parent
4d55146598
commit
b5ac5d7edb
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue