1 --- a/drivers/mtd/redboot.c
2 +++ b/drivers/mtd/redboot.c
3 @@ -60,31 +60,32 @@ 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 (master->block_isbad &&
15 + while (master->block_isbad &&
16 master->block_isbad(master, offset)) {
19 printk(KERN_NOTICE "Failed to find a non-bad block to check for RedBoot partition table\n");
23 offset -= master->erasesize;
26 offset = directory * master->erasesize;
27 - while (master->block_isbad &&
28 + while (master->block_isbad &&
29 master->block_isbad(master, offset)) {
30 offset += master->erasesize;
31 if (offset == master->size)
35 - buf = vmalloc(master->erasesize);
40 printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
41 master->name, offset);
43 @@ -156,6 +157,11 @@ static int parse_redboot_partitions(stru
47 + if (offset + master->erasesize < master->size) {
48 + /* not at the end of the flash yet, maybe next block :) */
52 printk(KERN_NOTICE "No RedBoot partition table detected in %s\n",