Skip to content

Commit

Permalink
[MTD] Don't oops when the RedBoot partition table is empty
Browse files Browse the repository at this point in the history
This fixes a regression with the RedBoot parsing code introduced by
commit 0b47d65

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
Martin Michlmayr authored and David Woodhouse committed Feb 9, 2007
1 parent d24030f commit 678c857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/redboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
}
}
break;
} else {
} else if (buf[i].size != -1) {
/* re-calculate of real numslots */
numslots = buf[i].size / sizeof(struct fis_image_desc);
}
Expand Down

0 comments on commit 678c857

Please sign in to comment.