diff options
author | Liu, Wentao <wentao.liu@intel.com> | 2012-01-17 19:55:02 +0000 |
---|---|---|
committer | Scott Wood <scott@tyr.buserror.net> | 2012-05-18 18:08:45 -0500 |
commit | 65683026a5eb07d6186dc02b33b1e5874dbb6591 (patch) | |
tree | c825e42a95025e9667cadd20dc048d88a71a8075 | |
parent | d2a97daf629a49a416ed405b8c7c2a1e77b99148 (diff) | |
download | u-boot-imx-65683026a5eb07d6186dc02b33b1e5874dbb6591.zip u-boot-imx-65683026a5eb07d6186dc02b33b1e5874dbb6591.tar.gz u-boot-imx-65683026a5eb07d6186dc02b33b1e5874dbb6591.tar.bz2 |
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>
-rw-r--r-- | drivers/mtd/nand/nand_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c index 60c778e..7ed8b18 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; |