| Submitter | Sebastian Siewior |
|---|---|
| Date | April 23, 2010, 5:28 p.m. |
| Message ID | <20100423172819.GA29224@Chamillionaire.breakpoint.cc> |
| Download | mbox | patch |
| Permalink | /patch/50855/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index dc5f688..7529d46 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c @@ -756,7 +756,8 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, bitflips = 1; } - si->is_empty = 0; + if (err != UBI_IO_BAD_EC_HDR) + si->is_empty = 0; if (!ec_corr) { int image_seq; @@ -827,6 +828,7 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, return err; goto adjust_mean_ec; } + si->is_empty = 0; vol_id = be32_to_cpu(vidh->vol_id); if (vol_id > UBI_MAX_VOLUMES && vol_id != UBI_LAYOUT_VOLUME_ID) {