Skip to contentSkip to conversation

fix nand_fill_oob

PATCH New Vitaly Wool 1 participant 1 message Jun 7, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix nand_fill_oob

Folks,

inlined is the fix to nand_fill_oob function which prevents it from writing garbage to OOB buffer when ops->len < ops->ooblen.

drivers/mtd/nand/nand_base.c +1 -1
index 77406fc..203693b 100644
@@ -1400,7 +1510,7 @@ static int nand_write_page(struct mtd_in
 static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob,
 				  struct mtd_oob_ops *ops)
 {
-	size_t len = ops->ooblen;
+	size_t len = ops->len;
 
 	switch(ops->mode) {