From: Artem Bityutskiy Date: Fri, 30 Jul 2010 13:31:38 +0000 (+0300) Subject: UBI: do not print message about corruptes PEBs if we have none of them X-Git-Tag: v2.6.36-rc1~586^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cdb996ee4d04b5bb2cd544b14e8eb91cfd7fe64;p=profile%2Fivi%2Fkernel-x86-ivi.git UBI: do not print message about corruptes PEBs if we have none of them Currently UBI prints UBI: corrupted PEBs will be formatted even if there are not corrupted PEBs. Fix this. Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index a86c048..372a15a 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c @@ -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; }