[PATCH] NAND: fix nand_write_oob_std return value

Alexander Belyakov abelyako at googlemail.com
Wed Jun 21 07:36:08 EDT 2006


It seems nand_write_oob_std should not return just status value

Signed-off-by: Alexander Belyakov <alexander.belyakov at 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;
 }

 /**




More information about the linux-mtd mailing list