diff options
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r-- | drivers/mtd/ubi/scan.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index 69b52e9c9489..7e7c56d162ec 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
@@ -750,7 +750,7 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, | |||
750 | bitflips = 1; | 750 | bitflips = 1; |
751 | else if (err == UBI_IO_PEB_EMPTY) | 751 | else if (err == UBI_IO_PEB_EMPTY) |
752 | return add_to_list(si, pnum, UBI_SCAN_UNKNOWN_EC, &si->erase); | 752 | return add_to_list(si, pnum, UBI_SCAN_UNKNOWN_EC, &si->erase); |
753 | else if (err == UBI_IO_BAD_HDR_READ || err == UBI_IO_BAD_HDR) { | 753 | else if (err == UBI_IO_BAD_HDR_EBADMSG || err == UBI_IO_BAD_HDR) { |
754 | /* | 754 | /* |
755 | * We have to also look at the VID header, possibly it is not | 755 | * We have to also look at the VID header, possibly it is not |
756 | * corrupted. Set %bitflips flag in order to make this PEB be | 756 | * corrupted. Set %bitflips flag in order to make this PEB be |
@@ -816,11 +816,11 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, | |||
816 | return err; | 816 | return err; |
817 | else if (err == UBI_IO_BITFLIPS) | 817 | else if (err == UBI_IO_BITFLIPS) |
818 | bitflips = 1; | 818 | bitflips = 1; |
819 | else if (err == UBI_IO_BAD_HDR_READ || err == UBI_IO_BAD_HDR || | 819 | else if (err == UBI_IO_BAD_HDR_EBADMSG || err == UBI_IO_BAD_HDR || |
820 | (err == UBI_IO_PEB_FREE && ec_corr)) { | 820 | (err == UBI_IO_PEB_FREE && ec_corr)) { |
821 | /* VID header is corrupted */ | 821 | /* VID header is corrupted */ |
822 | if (err == UBI_IO_BAD_HDR_READ || | 822 | if (err == UBI_IO_BAD_HDR_EBADMSG || |
823 | ec_corr == UBI_IO_BAD_HDR_READ) | 823 | ec_corr == UBI_IO_BAD_HDR_EBADMSG) |
824 | si->read_err_count += 1; | 824 | si->read_err_count += 1; |
825 | err = add_to_list(si, pnum, ec, &si->corr); | 825 | err = add_to_list(si, pnum, ec, &si->corr); |
826 | if (err) | 826 | if (err) |