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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 0c05f7b90127..e47663870501 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -286,9 +286,14 @@ static int compare_lebs(struct ubi_device *ubi, const struct ubi_scan_leb *seb,
286 * FIXME: but this is anyway obsolete and will be removed at 286 * FIXME: but this is anyway obsolete and will be removed at
287 * some point. 287 * some point.
288 */ 288 */
289
290 dbg_bld("using old crappy leb_ver stuff"); 289 dbg_bld("using old crappy leb_ver stuff");
291 290
291 if (v1 == v2) {
292 ubi_err("PEB %d and PEB %d have the same version %lld",
293 seb->pnum, pnum, v1);
294 return -EINVAL;
295 }
296
292 abs = v1 - v2; 297 abs = v1 - v2;
293 if (abs < 0) 298 if (abs < 0)
294 abs = -abs; 299 abs = -abs;