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: Stefan Agner <stefan@agner.ch> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
This commit is contained in:
parent
ac9cd36c7a
commit
148a1a5d74
1 changed files with 7 additions and 3 deletions
|
@ -435,9 +435,13 @@ static int __init mtd_pagetest_init(void)
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
err = erasecrosstest();
|
if (ebcnt > 1) {
|
||||||
if (err)
|
err = erasecrosstest();
|
||||||
goto out;
|
if (err)
|
||||||
|
goto out;
|
||||||
|
} else {
|
||||||
|
pr_info("skipping erasecrosstest, 2 erase blocks needed\n");
|
||||||
|
}
|
||||||
|
|
||||||
err = erasetest();
|
err = erasetest();
|
||||||
if (err)
|
if (err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue