summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorLiu, Wentao <wentao.liu@intel.com>2012-01-17 19:55:02 +0000
committerScott Wood <scott@tyr.buserror.net>2012-05-18 18:08:45 -0500
commit65683026a5eb07d6186dc02b33b1e5874dbb6591 (patch)
treec825e42a95025e9667cadd20dc048d88a71a8075 /drivers/mtd/nand
parentd2a97daf629a49a416ed405b8c7c2a1e77b99148 (diff)
nand_util: correct YAFFS image write function
In function nand_write_skip_bad(),for YAFFS filesystem part, write_oob() will return 0 when success, so when rval equals 0, it should continue to write the next page, and no break. Signed-off-by: Wentao, Liu <wentao.liu@intel.com> Acked-by: Lei Wen <leiwen@marvell.com> Signed-off-by: Scott Wood <scott@tyr.buserror.net>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/nand_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 60c778e637..7ed8b1891c 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -564,7 +564,7 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
ops.oobbuf = ops.datbuf + pagesize;
rval = nand->write_oob(nand, offset, &ops);
- if (!rval)
+ if (rval != 0)
break;
offset += pagesize;