Loading drivers/mtd/ubi/scan.c +9 −7 Original line number Original line Diff line number Diff line Loading @@ -787,16 +787,15 @@ static int check_corruption(struct ubi_device *ubi, struct ubi_vid_hdr *vid_hdr, * erased, so it became unstable and corrupted, and should be * erased, so it became unstable and corrupted, and should be * erased. * erased. */ */ return 0; err = 0; goto out_unlock; } } if (err) if (err) return err; goto out_unlock; if (ubi_check_pattern(ubi->peb_buf1, 0xFF, ubi->leb_size)) { if (ubi_check_pattern(ubi->peb_buf1, 0xFF, ubi->leb_size)) mutex_unlock(&ubi->buf_mutex); goto out_unlock; return 0; } ubi_err("PEB %d contains corrupted VID header, and the data does not " ubi_err("PEB %d contains corrupted VID header, and the data does not " "contain all 0xFF, this may be a non-UBI PEB or a severe VID " "contain all 0xFF, this may be a non-UBI PEB or a severe VID " Loading @@ -806,8 +805,11 @@ static int check_corruption(struct ubi_device *ubi, struct ubi_vid_hdr *vid_hdr, pnum, ubi->leb_start, ubi->leb_size); pnum, ubi->leb_start, ubi->leb_size); ubi_dbg_print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1, ubi_dbg_print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1, ubi->peb_buf1, ubi->leb_size, 1); ubi->peb_buf1, ubi->leb_size, 1); err = 1; out_unlock: mutex_unlock(&ubi->buf_mutex); mutex_unlock(&ubi->buf_mutex); return 1; return err; } } /** /** Loading Loading
drivers/mtd/ubi/scan.c +9 −7 Original line number Original line Diff line number Diff line Loading @@ -787,16 +787,15 @@ static int check_corruption(struct ubi_device *ubi, struct ubi_vid_hdr *vid_hdr, * erased, so it became unstable and corrupted, and should be * erased, so it became unstable and corrupted, and should be * erased. * erased. */ */ return 0; err = 0; goto out_unlock; } } if (err) if (err) return err; goto out_unlock; if (ubi_check_pattern(ubi->peb_buf1, 0xFF, ubi->leb_size)) { if (ubi_check_pattern(ubi->peb_buf1, 0xFF, ubi->leb_size)) mutex_unlock(&ubi->buf_mutex); goto out_unlock; return 0; } ubi_err("PEB %d contains corrupted VID header, and the data does not " ubi_err("PEB %d contains corrupted VID header, and the data does not " "contain all 0xFF, this may be a non-UBI PEB or a severe VID " "contain all 0xFF, this may be a non-UBI PEB or a severe VID " Loading @@ -806,8 +805,11 @@ static int check_corruption(struct ubi_device *ubi, struct ubi_vid_hdr *vid_hdr, pnum, ubi->leb_start, ubi->leb_size); pnum, ubi->leb_start, ubi->leb_size); ubi_dbg_print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1, ubi_dbg_print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1, ubi->peb_buf1, ubi->leb_size, 1); ubi->peb_buf1, ubi->leb_size, 1); err = 1; out_unlock: mutex_unlock(&ubi->buf_mutex); mutex_unlock(&ubi->buf_mutex); return 1; return err; } } /** /** Loading