diff mbox

[10/39] mtd: nand: denali: remove redundant if conditional of erased_check

Message ID 1480183585-592-11-git-send-email-yamada.masahiro@socionext.com
State Deferred
Headers show

Commit Message

Masahiro Yamada Nov. 26, 2016, 6:05 p.m. UTC
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(-)
diff mbox

Patch

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 753e9a02..ab59371 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -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;
 }