diff options
author | Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> | 2016-03-01 16:04:00 -0500 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2016-03-04 16:59:20 -0800 |
commit | c57753d4541d5104284abbdceb841e690394e55f (patch) | |
tree | ebc005a85403d9768410a0a8affbd7f28c4b50d5 /drivers/mtd/tests | |
parent | 44248affb5d82d32cdb58a92a94ce191d4ddee60 (diff) | |
download | linux-next-c57753d4541d5104284abbdceb841e690394e55f.tar.gz |
mtd: nand: tests: fix regression introduced in mtd_nandectest
Offending Commit: 6e94119 "mtd: nand: return consistent error codes in
ecc.correct() implementations"
The new error code was not being handled properly in double bit error
detection.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/tests')
-rw-r--r-- | drivers/mtd/tests/mtd_nandecctest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c index 79316159eec6..88b6c81cebbe 100644 --- a/drivers/mtd/tests/mtd_nandecctest.c +++ b/drivers/mtd/tests/mtd_nandecctest.c @@ -187,7 +187,7 @@ static int double_bit_error_detect(void *error_data, void *error_ecc, __nand_calculate_ecc(error_data, size, calc_ecc); ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size); - return (ret == -1) ? 0 : -EINVAL; + return (ret == -EBADMSG) ? 0 : -EINVAL; } static const struct nand_ecc_test nand_ecc_test[] = { |