[2.6 patch] drivers_mtd_maps_vmax301.c: fix off by one vmax_mtd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Petri T. Koistinen" <[email protected]>

This patch fixes an obcious off-by-one error (vmax_mtd[] contains 
two elements).

Signed-off-by: Adrian Bunk <[email protected]>

--- linux-2.6.14-rc3-git3/drivers/mtd/maps/vmax301.c	2005-05-25 13:48:53.000000000 +1000
+++ .6877.trivial/drivers/mtd/maps/vmax301.c	2005-10-04 19:29:50.000000000 +1000
@@ -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;
 	}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux