UBI: Fastmap: Fall back to scanning mode after ECC error
[deliverable/linux.git] / drivers / mtd / ubi / attach.c
index 42d465add3859101d12548e139b9642b2094dded..68eea5befaf12c96db4063a32ab81c20a8abfd96 100644 (file)
@@ -1419,7 +1419,7 @@ int ubi_attach(struct ubi_device *ubi, int force_scan)
                err = scan_all(ubi, ai, 0);
        else {
                err = scan_fast(ubi, &ai);
-               if (err > 0) {
+               if (err > 0 || mtd_is_eccerr(err)) {
                        if (err != UBI_NO_FASTMAP) {
                                destroy_ai(ai);
                                ai = alloc_ai();
This page took 0.028059 seconds and 5 git commands to generate.