[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1480183585-592-10-git-send-email-yamada.masahiro@socionext.com>
Date: Sun, 27 Nov 2016 03:05:55 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: linux-mtd@...ts.infradead.org
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>,
linux-kernel@...r.kernel.org,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
Marek Vasut <marek.vasut@...il.com>,
Brian Norris <computersforpeace@...il.com>,
Richard Weinberger <richard@....at>,
David Woodhouse <dwmw2@...radead.org>,
Cyrille Pitchen <cyrille.pitchen@...el.com>
Subject: [PATCH 09/39] mtd: nand: denali: fix erased page check code
Currently, is_erased() is called against "buf" twice, so the second
call is meaningless. The second one should be checked against
chip->oob_poi.
Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
---
drivers/mtd/nand/denali.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index cbc7f75..753e9a02 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1160,7 +1160,7 @@ static int denali_read_page(struct mtd_info *mtd, struct nand_chip *chip,
if (check_erased_page) {
if (!is_erased(buf, mtd->writesize))
mtd->ecc_stats.failed++;
- if (!is_erased(buf, mtd->oobsize))
+ if (!is_erased(chip->oob_poi, mtd->oobsize))
mtd->ecc_stats.failed++;
}
}
--
2.7.4
Powered by blists - more mailing lists