diff options
Diffstat (limited to 'drivers/mtd/ubi/attach.c')
| -rw-r--r-- | drivers/mtd/ubi/attach.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index c071d410488f..33bb1f2b63e4 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c | |||
| @@ -900,10 +900,9 @@ static int scan_peb(struct ubi_device *ubi, struct ubi_attach_info *ai, | |||
| 900 | * number. | 900 | * number. |
| 901 | */ | 901 | */ |
| 902 | image_seq = be32_to_cpu(ech->image_seq); | 902 | image_seq = be32_to_cpu(ech->image_seq); |
| 903 | if (!ubi->image_seq && image_seq) | 903 | if (!ubi->image_seq) |
| 904 | ubi->image_seq = image_seq; | 904 | ubi->image_seq = image_seq; |
| 905 | if (ubi->image_seq && image_seq && | 905 | if (image_seq && ubi->image_seq != image_seq) { |
| 906 | ubi->image_seq != image_seq) { | ||
| 907 | ubi_err("bad image sequence number %d in PEB %d, expected %d", | 906 | ubi_err("bad image sequence number %d in PEB %d, expected %d", |
| 908 | image_seq, pnum, ubi->image_seq); | 907 | image_seq, pnum, ubi->image_seq); |
| 909 | ubi_dump_ec_hdr(ech); | 908 | ubi_dump_ec_hdr(ech); |
| @@ -1417,9 +1416,11 @@ int ubi_attach(struct ubi_device *ubi, int force_scan) | |||
| 1417 | ai = alloc_ai("ubi_aeb_slab_cache2"); | 1416 | ai = alloc_ai("ubi_aeb_slab_cache2"); |
| 1418 | if (!ai) | 1417 | if (!ai) |
| 1419 | return -ENOMEM; | 1418 | return -ENOMEM; |
| 1420 | } | ||
| 1421 | 1419 | ||
| 1422 | err = scan_all(ubi, ai, UBI_FM_MAX_START); | 1420 | err = scan_all(ubi, ai, 0); |
| 1421 | } else { | ||
| 1422 | err = scan_all(ubi, ai, UBI_FM_MAX_START); | ||
| 1423 | } | ||
| 1423 | } | 1424 | } |
| 1424 | } | 1425 | } |
| 1425 | #else | 1426 | #else |
