UBI: do not print message about corruptes PEBs if we have none of them
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 30 Jul 2010 13:31:38 +0000 (16:31 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 2 Aug 2010 04:21:19 +0000 (07:21 +0300)
Currently UBI prints

UBI: corrupted PEBs will be formatted

even if there are not corrupted PEBs. Fix this.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/scan.c

index a86c048..372a15a 100644 (file)
@@ -964,7 +964,7 @@ static int check_what_we_have(struct ubi_device *ubi, struct ubi_scan_info *si)
                }
        }
 
-       if (si->corr_peb_count >= 0)
+       if (si->corr_peb_count > 0)
                ubi_msg("corrupted PEBs will be formatted");
        return 0;
 }