1 Index: linux-2.6.32.7/drivers/mtd/redboot.c
2 ===================================================================
3 --- linux-2.6.32.7.orig/drivers/mtd/redboot.c 2010-02-03 16:57:31.582429139 +0100
4 +++ linux-2.6.32.7/drivers/mtd/redboot.c 2010-02-03 17:01:57.067429178 +0100
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);
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",