提交 678c857f 编写于 作者: M Martin Michlmayr 提交者: David Woodhouse

[MTD] Don't oops when the RedBoot partition table is empty

This fixes a regression with the RedBoot parsing code introduced by
commit 0b47d654Signed-off-by: NMartin Michlmayr <tbm@cyrius.com>
Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
上级 d24030f0
...@@ -122,7 +122,7 @@ static int parse_redboot_partitions(struct mtd_info *master, ...@@ -122,7 +122,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
} }
} }
break; break;
} else { } else if (buf[i].size != -1) {
/* re-calculate of real numslots */ /* re-calculate of real numslots */
numslots = buf[i].size / sizeof(struct fis_image_desc); numslots = buf[i].size / sizeof(struct fis_image_desc);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册