diff options
author | Lee Jones <lee.jones@linaro.org> | 2014-03-20 07:11:44 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-03-20 07:56:51 -0400 |
commit | 0419a203f865603654953f407cf062309330f37e (patch) | |
tree | 545211adaa34ffb96e7f935df2193e0793b28987 /drivers/mtd/devices | |
parent | 3f9d720a4d29834b8362d820537acb042c17e33c (diff) |
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.c | 8 |
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, | |||
1729 | 1729 | ||
1730 | dev_dbg(fsm->dev, "%s to 0x%08x, len %zd\n", __func__, (u32)to, len); | 1730 | dev_dbg(fsm->dev, "%s to 0x%08x, len %zd\n", __func__, (u32)to, len); |
1731 | 1731 | ||
1732 | *retlen = 0; | ||
1733 | |||
1734 | if (!len) | ||
1735 | return 0; | ||
1736 | |||
1737 | if (to + len > mtd->size) | ||
1738 | return -EINVAL; | ||
1739 | |||
1740 | /* Offset within page */ | 1732 | /* Offset within page */ |
1741 | page_offs = to % FLASH_PAGESIZE; | 1733 | page_offs = to % FLASH_PAGESIZE; |
1742 | 1734 | ||