aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/redboot.c
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2007-02-02 13:14:41 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2007-02-09 10:06:53 -0500
commit678c857f3cffb076c36ce55dfa9fb570712cec12 (patch)
tree11a07d7e972a032fdccefbc5fcbc585b4d6bba40 /drivers/mtd/redboot.c
parentd24030f0f71390b1a01796d664445352bd403269 (diff)
[MTD] Don't oops when the RedBoot partition table is empty
This fixes a regression with the RedBoot parsing code introduced by commit 0b47d654089c5ce3f2ea26a4485db9bcead1e515 Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/redboot.c')
-rw-r--r--drivers/mtd/redboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
index 035cd9b0cc08..5a31f490368e 100644
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -122,7 +122,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
122 } 122 }
123 } 123 }
124 break; 124 break;
125 } else { 125 } else if (buf[i].size != -1) {
126 /* re-calculate of real numslots */ 126 /* re-calculate of real numslots */
127 numslots = buf[i].size / sizeof(struct fis_image_desc); 127 numslots = buf[i].size / sizeof(struct fis_image_desc);
128 } 128 }