mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
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>
This commit is contained in:
committed by
David Woodhouse
parent
664addc248
commit
834247ec7e
@@ -1753,9 +1753,6 @@ static int onenand_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
|
||||
pr_debug("%s: to = 0x%08x, len = %i\n", __func__, (unsigned int)to,
|
||||
(int)len);
|
||||
|
||||
/* Initialize retlen, in case of early exit */
|
||||
*retlen = 0;
|
||||
|
||||
/* Reject writes, which are not page aligned */
|
||||
if (unlikely(NOTALIGNED(to) || NOTALIGNED(len))) {
|
||||
printk(KERN_ERR "%s: Attempt to write not page aligned data\n",
|
||||
|
||||
Reference in New Issue
Block a user