diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-02-06 05:39:07 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-03-26 19:29:34 -0400 |
commit | 834247ec7e281dee839fe4a04bc1bbf0c7395172 (patch) | |
tree | c037c578ba572d9104a2341013acde044a8ca052 /drivers/mtd/onenand | |
parent | 664addc248d2fed68d013d26ff2fc796d7134259 (diff) |
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/onenand')
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 9c6445d372ce..a1592cf755f3 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -1753,9 +1753,6 @@ static int onenand_panic_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
1753 | pr_debug("%s: to = 0x%08x, len = %i\n", __func__, (unsigned int)to, | 1753 | pr_debug("%s: to = 0x%08x, len = %i\n", __func__, (unsigned int)to, |
1754 | (int)len); | 1754 | (int)len); |
1755 | 1755 | ||
1756 | /* Initialize retlen, in case of early exit */ | ||
1757 | *retlen = 0; | ||
1758 | |||
1759 | /* Reject writes, which are not page aligned */ | 1756 | /* Reject writes, which are not page aligned */ |
1760 | if (unlikely(NOTALIGNED(to) || NOTALIGNED(len))) { | 1757 | if (unlikely(NOTALIGNED(to) || NOTALIGNED(len))) { |
1761 | printk(KERN_ERR "%s: Attempt to write not page aligned data\n", | 1758 | printk(KERN_ERR "%s: Attempt to write not page aligned data\n", |