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/mtdconcat.c | |
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/mtdconcat.c')
-rw-r--r-- | drivers/mtd/mtdconcat.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index dd24232265e6..f7a31cc44480 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c | |||
@@ -72,8 +72,6 @@ concat_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
72 | int ret = 0, err; | 72 | int ret = 0, err; |
73 | int i; | 73 | int i; |
74 | 74 | ||
75 | *retlen = 0; | ||
76 | |||
77 | for (i = 0; i < concat->num_subdev; i++) { | 75 | for (i = 0; i < concat->num_subdev; i++) { |
78 | struct mtd_info *subdev = concat->subdev[i]; | 76 | struct mtd_info *subdev = concat->subdev[i]; |
79 | size_t size, retsize; | 77 | size_t size, retsize; |
@@ -126,8 +124,6 @@ concat_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
126 | int err = -EINVAL; | 124 | int err = -EINVAL; |
127 | int i; | 125 | int i; |
128 | 126 | ||
129 | *retlen = 0; | ||
130 | |||
131 | for (i = 0; i < concat->num_subdev; i++) { | 127 | for (i = 0; i < concat->num_subdev; i++) { |
132 | struct mtd_info *subdev = concat->subdev[i]; | 128 | struct mtd_info *subdev = concat->subdev[i]; |
133 | size_t size, retsize; | 129 | size_t size, retsize; |
@@ -169,8 +165,6 @@ concat_writev(struct mtd_info *mtd, const struct kvec *vecs, | |||
169 | int i; | 165 | int i; |
170 | int err = -EINVAL; | 166 | int err = -EINVAL; |
171 | 167 | ||
172 | *retlen = 0; | ||
173 | |||
174 | /* Calculate total length of data */ | 168 | /* Calculate total length of data */ |
175 | for (i = 0; i < count; i++) | 169 | for (i = 0; i < count; i++) |
176 | total_len += vecs[i].iov_len; | 170 | total_len += vecs[i].iov_len; |