]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: brcmnand: Zero bitflip is not an error
authorAlbert Hsieh <wen.hsieh@broadcom.com>
Mon, 20 Nov 2017 03:26:26 +0000 (11:26 +0800)
committerRichard Weinberger <richard@nod.at>
Fri, 15 Dec 2017 21:26:48 +0000 (22:26 +0100)
commit0235719c9a69ee2f2422cbf3059393f70ad6c111
tree94fbaa2bdeadfc3e4d7671abccc3c7d4e3cfffc4
parent682329bc2dc220b9865dfa814ec61254aeecd825
mtd: nand: brcmnand: Zero bitflip is not an error

A negative return value of brcmstb_nand_verify_erased_page() indicates a
real bitflip error of an erased page, and other return values (>= 0) show
the corrected bitflip number. Zero return value means no bitflip, but the
current driver code treats it as an error, and eventually leads to
falsely reported ECC error.

Fixes: 29b329526321 ("mtd: brcmnand: Add check for erased page bitflip")
Signed-off-by: Albert Hsieh <wen.hsieh@broadcom.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/nand/brcmnand/brcmnand.c