1 --- a/drivers/mtd/redboot.c
2 +++ b/drivers/mtd/redboot.c
3 @@ -79,6 +79,11 @@ static int parse_redboot_partitions(stru
4 static char nullstring[] = "unallocated";
7 + buf = vmalloc(master->erasesize);
12 if ( directory < 0 ) {
13 offset = master->size + directory * master->erasesize;
14 while (mtd_can_have_bb(master) &&
15 @@ -86,6 +91,7 @@ static int parse_redboot_partitions(stru
18 printk(KERN_NOTICE "Failed to find a non-bad block to check for RedBoot partition table\n");
22 offset -= master->erasesize;
23 @@ -99,10 +105,6 @@ static int parse_redboot_partitions(stru
27 - buf = vmalloc(master->erasesize);
32 printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
33 master->name, offset);
34 @@ -175,6 +177,11 @@ static int parse_redboot_partitions(stru
38 + if (offset + master->erasesize < master->size) {
39 + /* not at the end of the flash yet, maybe next block :) */
43 printk(KERN_NOTICE "No RedBoot partition table detected in %s\n",