@@ -1157,12 +1157,10 @@ static int denali_read_page(struct mtd_info *mtd, struct nand_chip *chip,
read_oob_data(mtd, chip->oob_poi, denali->page);
/* check ECC failures that may have occurred on erased pages */
- if (check_erased_page) {
- if (!is_erased(buf, mtd->writesize))
- mtd->ecc_stats.failed++;
- if (!is_erased(chip->oob_poi, mtd->oobsize))
- mtd->ecc_stats.failed++;
- }
+ if (!is_erased(buf, mtd->writesize))
+ mtd->ecc_stats.failed++;
+ if (!is_erased(chip->oob_poi, mtd->oobsize))
+ mtd->ecc_stats.failed++;
}
return max_bitflips;
}
This code block is nested by double "if (check_erase_page)". Remove the redundant inner one. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- drivers/mtd/nand/denali.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.7.4