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
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue