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 <Artem.Bityutskiy@nokia.com>
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 @@
}
}
- if (si->corr_peb_count >= 0)
+ if (si->corr_peb_count > 0)
ubi_msg("corrupted PEBs will be formatted");
return 0;
}