]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: tests: nandbiterrs: Fix read_page return value
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 9 Jan 2018 09:47:02 +0000 (10:47 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 9 Jan 2018 09:56:29 +0000 (10:56 +0100)
commit98925efbfb7da0f232d27326d76e166856c4e3ec
tree7440eab03302122ba2162db40e0be3405a8f2c13
parent0c601337140c25144763e56bd2a62c0f923c6ad9
mtd: tests: nandbiterrs: Fix read_page return value

The number of corrected bitflips is not correctly reported by
the test until the bitflip threshold is reached.

read_page() shall return the number of corrected bitflips, but
mtd_read() returns 0 or a negative error, so we can't forward
its return value. In the absence of an error we always have
calculate the number of bitflips ourselves.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/tests/nandbiterrs.c