aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2014-03-20 11:11:44 +0000
committerBrian Norris <computersforpeace@gmail.com>2014-03-20 04:56:51 -0700
commit0419a203f865603654953f407cf062309330f37e (patch)
tree545211adaa34ffb96e7f935df2193e0793b28987 /drivers/mtd/devices
parentmtd: st_spi_fsm: Remove useless consts from function arguments (diff)
downloadlinux-dev-0419a203f865603654953f407cf062309330f37e.tar.xz
linux-dev-0419a203f865603654953f407cf062309330f37e.zip
mtd: st_spi_fsm: Avoid duplicating MTD core code
Reported-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/st_spi_fsm.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c
index d1fb1e55aff7..80088e4880aa 100644
--- a/drivers/mtd/devices/st_spi_fsm.c
+++ b/drivers/mtd/devices/st_spi_fsm.c
@@ -1729,14 +1729,6 @@ static int stfsm_mtd_write(struct mtd_info *mtd, loff_t to, size_t len,
dev_dbg(fsm->dev, "%s to 0x%08x, len %zd\n", __func__, (u32)to, len);
- *retlen = 0;
-
- if (!len)
- return 0;
-
- if (to + len > mtd->size)
- return -EINVAL;
-
/* Offset within page */
page_offs = to % FLASH_PAGESIZE;