···787 * erased, so it became unstable and corrupted, and should be788 * erased.789 */790- return 0;0791 }792793 if (err)794- return err;795796- if (ubi_check_pattern(ubi->peb_buf1, 0xFF, ubi->leb_size)) {797- mutex_unlock(&ubi->buf_mutex);798- return 0;799- }800801 ubi_err("PEB %d contains corrupted VID header, and the data does not "802 "contain all 0xFF, this may be a non-UBI PEB or a severe VID "···805 pnum, ubi->leb_start, ubi->leb_size);806 ubi_dbg_print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,807 ubi->peb_buf1, ubi->leb_size, 1);000808 mutex_unlock(&ubi->buf_mutex);809- return 1;810}811812/**
···787 * erased, so it became unstable and corrupted, and should be788 * erased.789 */790+ err = 0;791+ goto out_unlock;792 }793794 if (err)795+ goto out_unlock;796797+ if (ubi_check_pattern(ubi->peb_buf1, 0xFF, ubi->leb_size))798+ goto out_unlock;00799800 ubi_err("PEB %d contains corrupted VID header, and the data does not "801 "contain all 0xFF, this may be a non-UBI PEB or a severe VID "···806 pnum, ubi->leb_start, ubi->leb_size);807 ubi_dbg_print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,808 ubi->peb_buf1, ubi->leb_size, 1);809+ err = 1;810+811+out_unlock:812 mutex_unlock(&ubi->buf_mutex);813+ return err;814}815816/**