summaryrefslogtreecommitdiff
path: root/yaffs_mtdif.c
diff options
context:
space:
mode:
authorluc <luc>2005-08-02 19:18:44 +0000
committerluc <luc>2005-08-02 19:18:44 +0000
commit0128ef2c964bf34556e8f683851a4d2d5e7cf3b3 (patch)
tree2c98e47c50a4d0ef17ff2346eecc96290a69c7b4 /yaffs_mtdif.c
parentbe543b3cc9f7075461ad0a830fd1aa54711eab95 (diff)
Check the return value of mtd->write_ecc() calls.
If not done, write failures will not be detected. Thanks to Artis Kugevics.
Diffstat (limited to 'yaffs_mtdif.c')
-rw-r--r--yaffs_mtdif.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/yaffs_mtdif.c b/yaffs_mtdif.c
index 5d1777e..9537b1a 100644
--- a/yaffs_mtdif.c
+++ b/yaffs_mtdif.c
@@ -13,7 +13,7 @@
*
*/
-const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.8 2005-08-02 19:17:55 luc Exp $";
+const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.9 2005-08-02 19:18:44 luc Exp $";
#include "yportenv.h"
@@ -52,9 +52,9 @@ int nandmtd_WriteChunkToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data,
if(data && spare)
{
if(dev->useNANDECC)
- mtd->write_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_oobinfo);
+ retval = mtd->write_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_oobinfo);
else
- mtd->write_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_noeccinfo);
+ retval = mtd->write_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_noeccinfo);
}
else
{