提交 148a1a5d 编写于 作者: S Stefan Agner 提交者: Boris Brezillon

mtd: tests: check erase block count in page test

When there is only a single erase block, the cross erase test
does not report sensible errors. Warn in case there is only
a single erase block instead of executing the test.
Signed-off-by: NStefan Agner <stefan@agner.ch>
Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
上级 ac9cd36c
......@@ -435,9 +435,13 @@ static int __init mtd_pagetest_init(void)
if (err)
goto out;
err = erasecrosstest();
if (err)
goto out;
if (ebcnt > 1) {
err = erasecrosstest();
if (err)
goto out;
} else {
pr_info("skipping erasecrosstest, 2 erase blocks needed\n");
}
err = erasetest();
if (err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册