mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
mtd: move zero length verification to MTD API functions
In many places in drivers we verify for the zero length, but this is very inconsistent across drivers. This is obviously the right thing to do, though. This patch moves the check to the MTD API functions instead and removes a lot of duplication. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
0dd5235f51
commit
bcb1d23871
13 changed files with 21 additions and 76 deletions
|
@ -639,7 +639,6 @@ static int lpddr_writev(struct mtd_info *mtd, const struct kvec *vecs,
|
|||
int chipnum;
|
||||
unsigned long ofs, vec_seek, i;
|
||||
int wbufsize = 1 << lpddr->qinfo->BufSizeShift;
|
||||
|
||||
size_t len = 0;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue