Skip to content

Commit

Permalink
[PATCH] drivers/mtd/maps/vmax301.c: fix off by one vmax_mtd
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Petri T. Koistinen authored and Linus Torvalds committed Mar 31, 2006
1 parent 4d55146 commit b5ac5d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/maps/vmax301.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b5ac5d7

Please sign in to comment.