summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/doc2001.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-02-06 11:39:07 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-27 01:29:34 +0200
commit834247ec7e281dee839fe4a04bc1bbf0c7395172 (patch)
treec037c578ba572d9104a2341013acde044a8ca052 /drivers/mtd/devices/doc2001.c
parentmtd: remove R/O checking duplication (diff)
downloadlinux-834247ec7e281dee839fe4a04bc1bbf0c7395172.tar.xz
linux-834247ec7e281dee839fe4a04bc1bbf0c7395172.zip
mtd: remove retlen zeroing duplication
The MTD API function now zero the 'retlen' parameter before calling the driver's method — do not do this again in drivers. This removes duplicated '*retlen = 0' assignent from the following methods: 'mtd_point()' 'mtd_read()' 'mtd_write()' 'mtd_writev()' 'mtd_panic_write()' Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices/doc2001.c')
-rw-r--r--drivers/mtd/devices/doc2001.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c
index 17844155a685..7bff54e62cd5 100644
--- a/drivers/mtd/devices/doc2001.c
+++ b/drivers/mtd/devices/doc2001.c
@@ -591,7 +591,6 @@ static int doc_write (struct mtd_info *mtd, loff_t to, size_t len,
printk("Error programming flash\n");
/* Error in programming
FIXME: implement Bad Block Replacement (in nftl.c ??) */
- *retlen = 0;
ret = -EIO;
}
dummy = ReadDOC(docptr, LastDataRead);