aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r--drivers/mtd/ubi/scan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index a3a198f9b98d..0cb17d936b5a 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -395,7 +395,7 @@ static int compare_lebs(struct ubi_device *ubi, const struct ubi_scan_leb *seb,
395 } 395 }
396 396
397 err = ubi_io_read_data(ubi, buf, pnum, 0, len); 397 err = ubi_io_read_data(ubi, buf, pnum, 0, len);
398 if (err && err != UBI_IO_BITFLIPS && err != -EBADMSG) 398 if (err && err != UBI_IO_BITFLIPS && !mtd_is_eccerr(err))
399 goto out_free_buf; 399 goto out_free_buf;
400 400
401 data_crc = be32_to_cpu(vid_hdr->data_crc); 401 data_crc = be32_to_cpu(vid_hdr->data_crc);
@@ -793,7 +793,7 @@ static int check_corruption(struct ubi_device *ubi, struct ubi_vid_hdr *vid_hdr,
793 793
794 err = ubi_io_read(ubi, ubi->peb_buf1, pnum, ubi->leb_start, 794 err = ubi_io_read(ubi, ubi->peb_buf1, pnum, ubi->leb_start,
795 ubi->leb_size); 795 ubi->leb_size);
796 if (err == UBI_IO_BITFLIPS || err == -EBADMSG) { 796 if (err == UBI_IO_BITFLIPS || mtd_is_eccerr(err)) {
797 /* 797 /*
798 * Bit-flips or integrity errors while reading the data area. 798 * Bit-flips or integrity errors while reading the data area.
799 * It is difficult to say for sure what type of corruption is 799 * It is difficult to say for sure what type of corruption is