public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] fix nand_fill_oob
@ 2006-06-07 10:54 Vitaly Wool
  0 siblings, 0 replies; only message in thread
From: Vitaly Wool @ 2006-06-07 10:54 UTC (permalink / raw)
  To: linux-mtd

Folks,

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

Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 77406fc..203693b 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -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) {
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-07 10:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-07 10:54 [PATCH] fix nand_fill_oob Vitaly Wool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox