public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] NAND: fix nand_write_oob_std return value
@ 2006-06-21 11:36 Alexander Belyakov
  2006-06-21 11:43 ` Thomas Gleixner
  2006-06-21 12:03 ` Vitaly Wool
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Belyakov @ 2006-06-21 11:36 UTC (permalink / raw)
  To: Linux MTD mailing list; +Cc: Thomas Gleixner

It seems nand_write_oob_std should not return just status value

Signed-off-by: Alexander Belyakov <alexander.belyakov@intel.com>

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 27083ed..79eae5d 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1176,7 +1176,7 @@ static int nand_write_oob_std(struct mtd

 	status = chip->waitfunc(mtd, chip);

-	return status;
+	return status & NAND_STATUS_FAIL ? -EIO : 0;
 }

 /**

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-21 12:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-21 11:36 [PATCH] NAND: fix nand_write_oob_std return value Alexander Belyakov
2006-06-21 11:43 ` Thomas Gleixner
2006-06-21 12:03 ` Vitaly Wool

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