1 Index: linux-2.6.25.4/drivers/mtd/redboot.c
2 ===================================================================
3 --- linux-2.6.25.4.orig/drivers/mtd/redboot.c
4 +++ linux-2.6.25.4/drivers/mtd/redboot.c
5 @@ -59,31 +59,32 @@ static int parse_redboot_partitions(stru
6 static char nullstring[] = "unallocated";
9 + buf = vmalloc(master->erasesize);
14 if ( directory < 0 ) {
15 offset = master->size + directory * master->erasesize;
16 - while (master->block_isbad &&
17 + while (master->block_isbad &&
18 master->block_isbad(master, offset)) {
21 printk(KERN_NOTICE "Failed to find a non-bad block to check for RedBoot partition table\n");
25 offset -= master->erasesize;
28 offset = directory * master->erasesize;
29 - while (master->block_isbad &&
30 + while (master->block_isbad &&
31 master->block_isbad(master, offset)) {
32 offset += master->erasesize;
33 if (offset == master->size)
37 - buf = vmalloc(master->erasesize);
42 printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
43 master->name, offset);
45 @@ -155,6 +156,11 @@ static int parse_redboot_partitions(stru
49 + if (offset + master->erasesize < master->size) {
50 + /* not at the end of the flash yet, maybe next block :) */
54 printk(KERN_NOTICE "No RedBoot partition table detected in %s\n",