UBI: fix EBADMSG handling
'ubi_io_read_data()' may return EBADMSG in case of an ECC error, and we should not panic because of this. We have CRC32 checksum and may check the data. So just ignore the EBADMSG error. This patch also fixes a minor spelling error at the same time. Signed-off-by: Zoltan Sogor <weth@inf.u-szeged.hu> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
committed by
Artem Bityutskiy
parent
45beca08dd
commit
b77bcb0789
@@ -320,7 +320,7 @@ static int compare_lebs(struct ubi_device *ubi, const struct ubi_scan_leb *seb,
|
||||
}
|
||||
|
||||
err = ubi_io_read_data(ubi, buf, pnum, 0, len);
|
||||
if (err && err != UBI_IO_BITFLIPS)
|
||||
if (err && err != UBI_IO_BITFLIPS && err != -EBADMSG)
|
||||
goto out_free_buf;
|
||||
|
||||
data_crc = be32_to_cpu(vid_hdr->data_crc);
|
||||
|
Reference in New Issue
Block a user