aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/scan.c
diff options
context:
space:
mode:
authorZoltan Sogor <weth@inf.u-szeged.hu>2008-10-29 04:50:02 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-11-06 04:13:02 -0500
commitb77bcb07897f1a9cd9d1d78691896dcdb0fd1a22 (patch)
tree1bc140b0a6b112b78bce4c0afd17f845e84d8fee /drivers/mtd/ubi/scan.c
parent45beca08dd8b6d6a65c5ffd730af2eac7a2c7a03 (diff)
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>
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r--drivers/mtd/ubi/scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 4f2daa5bbecf..41d47e1cf15c 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -320,7 +320,7 @@ static int compare_lebs(struct ubi_device *ubi, const struct ubi_scan_leb *seb,
320 } 320 }
321 321
322 err = ubi_io_read_data(ubi, buf, pnum, 0, len); 322 err = ubi_io_read_data(ubi, buf, pnum, 0, len);
323 if (err && err != UBI_IO_BITFLIPS) 323 if (err && err != UBI_IO_BITFLIPS && err != -EBADMSG)
324 goto out_free_buf; 324 goto out_free_buf;
325 325
326 data_crc = be32_to_cpu(vid_hdr->data_crc); 326 data_crc = be32_to_cpu(vid_hdr->data_crc);