From: Zhaoxiu Zeng Date: Tue, 12 Apr 2016 07:30:35 +0000 (+0800) Subject: mtd: nand: s3c2410: fix bug in s3c2410_nand_correct_data() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=03a97550941d17c7d5b621afde5945bbc0da6546;p=linux-beck.git mtd: nand: s3c2410: fix bug in s3c2410_nand_correct_data() If there is only one bit difference in the ECC, the function should return 1. The result of "diff0 & ~(1< Signed-off-by: Boris Brezillon --- diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 9c9397b54b2c..86ffb73e1085 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -542,7 +542,8 @@ static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat, diff0 |= (diff1 << 8); diff0 |= (diff2 << 16); - if ((diff0 & ~(1<