Index: drivers/mtd/chips/gen_probe.c =================================================================== RCS file: /cvs/PM35_35_14_01/linux_2_6/drivers/mtd/chips/gen_probe.c,v retrieving revision 1.1.1.3 diff -u -u -r1.1.1.3 gen_probe.c --- drivers/mtd/chips/gen_probe.c 10 Jan 2006 00:44:25 -0000 1.1.1.3 +++ drivers/mtd/chips/gen_probe.c 19 Apr 2006 16:32:10 -0000 @@ -100,6 +100,13 @@ * Align bitmap storage size to full byte. */ max_chips = map->size >> cfi.chipshift; + // If we shift down to 0, assume there is at least one chip here + if( max_chips == 0 ) + { + printk( KERN_WARNING "%s: map->size as specified is less than " + "actual chip size\n", map->name ); + max_chips = 1; + } mapsize = (max_chips / 8) + ((max_chips % 8) ? 1 : 0); chip_map = kmalloc(mapsize, GFP_KERNEL); if (!chip_map) {