9
0
Fork 0

ubiformat: Ignore bitflip errors

Fixes: 1d88c66 ubiformat: Use mtd-peb API

bit flips are no error, when encountering them during scanning of a
device just ignore them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2016-05-17 12:44:45 +02:00
parent b47a5a7ed6
commit 821de09b1f
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ int libscan_ubi_scan(struct mtd_info *mtd, struct ubi_scan_info **info,
}
ret = mtd_peb_read(mtd, &ech, eb, 0, sizeof(struct ubi_ec_hdr));
if (ret < 0)
if (ret < 0 && !mtd_is_bitflip(ret))
goto out_ec;
if (be32_to_cpu(ech.magic) != UBI_EC_HDR_MAGIC) {