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:
parent
b47a5a7ed6
commit
821de09b1f
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue