mtd: nand: fix erronous read_buf call in nand_write_page_raw_syndrome
Subsystems (2)
PATCH 1/1 mtd: nand: fix erronous read_buf call in nand_write_page_raw_syndrome
read_buf is called in place of write_buf in thenand_write_page_raw_syndrome function.
Signed-off-by Boris BREZILLON <[email protected]>
--- drivers/mtd/nand/nand_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/nand_base.c +1 -1
@@ -1902,7 +1902,7 @@ static int nand_write_page_raw_syndrome(struct mtd_info *mtd, oob += chip->ecc.prepad; } - chip->read_buf (mtd, oob, eccbytes); + chip->write_buf (mtd, oob, eccbytes); oob += eccbytes;if (chip->ecc.postpad) {
Signature · 1 line
1.7.9.5
Brian Norris
AppliedQuoted 4 lines · Boris BREZILLON
read_bufis called in place ofwrite_bufin thenand_write_page_raw_syndromefunction.Signed-off-by Boris BREZILLON <[email protected]>
Good catch! I guess no one really tests this function. I can understand that, since it's in the "raw" version (i.e., without ECC), which should really only be used for special debugging purposes. And many drivers don't use the defaults for page writes.
Pushed to l2-mtd.git.
Brian