Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}