]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: fix generating over-boundary ECC data when writing
authorRogerCC Lin <rogercc.lin@mediatek.com>
Mon, 19 Sep 2016 02:53:25 +0000 (10:53 +0800)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 19 Sep 2016 09:56:33 +0000 (11:56 +0200)
commitb0a39b3fd626ed3c60645eaee87d909151b86ebb
tree9299f504fb4797d8c51e2778c0bb10d6e672f516
parent6f0492d57521ebcb7738041489264027c3c20a0a
mtd: nand: fix generating over-boundary ECC data when writing

When mtk_ecc_encode() is writing the ECC parity data to the OOB
region,because each register is 4 bytes in length,but the len's unit is
in bytes,the operation in the for loop will cross the ECC's boundary.

Signed-off-by: RogerCC Lin <rogercc.lin@mediatek.com>
Fixes: be1a31b54754 ("mtd: mediatek: driver for MTK Smart Device")
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mtk_ecc.c