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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 40eca9ce5fab..0bb7488862d2 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -248,7 +248,8 @@ static int compare_lebs(struct ubi_device *ubi, const struct ubi_scan_leb *seb,
248 unsigned long long sqnum2 = be64_to_cpu(vid_hdr->sqnum); 248 unsigned long long sqnum2 = be64_to_cpu(vid_hdr->sqnum);
249 249
250 if (seb->sqnum == 0 && sqnum2 == 0) { 250 if (seb->sqnum == 0 && sqnum2 == 0) {
251 long long abs, v1 = seb->leb_ver, v2 = be32_to_cpu(vid_hdr->leb_ver); 251 long long abs;
252 long long v1 = seb->leb_ver, v2 = be32_to_cpu(vid_hdr->leb_ver);
252 253
253 /* 254 /*
254 * UBI constantly increases the logical eraseblock version 255 * UBI constantly increases the logical eraseblock version
@@ -752,7 +753,8 @@ struct ubi_scan_leb *ubi_scan_get_free_peb(struct ubi_device *ubi,
752 * This function returns a zero if the physical eraseblock was successfully 753 * This function returns a zero if the physical eraseblock was successfully
753 * handled and a negative error code in case of failure. 754 * handled and a negative error code in case of failure.
754 */ 755 */
755static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, int pnum) 756static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si,
757 int pnum)
756{ 758{
757 long long uninitialized_var(ec); 759 long long uninitialized_var(ec);
758 int err, bitflips = 0, vol_id, ec_corr = 0; 760 int err, bitflips = 0, vol_id, ec_corr = 0;
@@ -1301,8 +1303,7 @@ static int paranoid_check_si(struct ubi_device *ubi, struct ubi_scan_info *si)
1301 if (err < 0) { 1303 if (err < 0) {
1302 kfree(buf); 1304 kfree(buf);
1303 return err; 1305 return err;
1304 } 1306 } else if (err)
1305 else if (err)
1306 buf[pnum] = 1; 1307 buf[pnum] = 1;
1307 } 1308 }
1308 1309