summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/lpddr
diff options
context:
space:
mode:
authorArtem Bityutskiy2012-02-06 12:27:43 +0100
committerDavid Woodhouse2012-03-27 01:32:19 +0200
commitbcb1d238716d138c9e16347fc32b3c1ae006339e (patch)
treeccb7a9aea7b77481fa3474124218521e0c32de82 /drivers/mtd/lpddr
parentmtd: harmonize mtd_point interface implementation (diff)
downloadkernel-qcow2-linux-bcb1d238716d138c9e16347fc32b3c1ae006339e.tar.gz
kernel-qcow2-linux-bcb1d238716d138c9e16347fc32b3c1ae006339e.tar.xz
kernel-qcow2-linux-bcb1d238716d138c9e16347fc32b3c1ae006339e.zip
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>
Diffstat (limited to 'drivers/mtd/lpddr')
-rw-r--r--drivers/mtd/lpddr/lpddr_cmds.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
index a92906ba535d..d3cfe26beeaa 100644
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -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++)