From: Belisko Marek Date: Fri, 25 Apr 2014 10:00:07 +0000 (+0200) Subject: mtd: nand: omap_gpmc: Fix update of read_ecc in oob X-Git-Tag: v2014.07-rc2~9^2~4^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=97eeae1a0735fc17351f10b9978e966392badedc;p=u-boot mtd: nand: omap_gpmc: Fix update of read_ecc in oob We need to flip only one bit not assign. Signed-off-by: Marek Belisko Acked-by: Pekon Gupta --- diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c index 881a63618c..bf99b8e675 100644 --- a/drivers/mtd/nand/omap_gpmc.c +++ b/drivers/mtd/nand/omap_gpmc.c @@ -403,7 +403,7 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat, dat[byte_pos] ^= 1 << bit_pos; printf("nand: bit-flip corrected @data=%d\n", byte_pos); } else if (byte_pos < error_max) { - read_ecc[byte_pos - SECTOR_BYTES] = 1 << bit_pos; + read_ecc[byte_pos - SECTOR_BYTES] ^= 1 << bit_pos; printf("nand: bit-flip corrected @oob=%d\n", byte_pos - SECTOR_BYTES); } else {