Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 003bc479 authored by Brian Norris's avatar Brian Norris Committed by Artem Bityutskiy
Browse files

mtd: tests: ignore corrected bitflips in OOB on mtd_readtest



read_oob may now return ECC error codes. If the code is -EUCLEAN, then
we can safely ignore the error as a corrected bitflip.

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <dedekind1@gmail.com>
parent 903cd06c
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -75,7 +75,8 @@ static int read_eraseblock_by_page(int ebnum)
			ops.datbuf    = NULL;
			ops.datbuf    = NULL;
			ops.oobbuf    = oobbuf;
			ops.oobbuf    = oobbuf;
			ret = mtd->read_oob(mtd, addr, &ops);
			ret = mtd->read_oob(mtd, addr, &ops);
			if (ret || ops.oobretlen != mtd->oobsize) {
			if ((ret && ret != -EUCLEAN) ||
					ops.oobretlen != mtd->oobsize) {
				printk(PRINT_PREF "error: read oob failed at "
				printk(PRINT_PREF "error: read oob failed at "
						  "%#llx\n", (long long)addr);
						  "%#llx\n", (long long)addr);
				if (!err)
				if (!err)