[PATCH 2/5] mtd: st_spi_fsm: Avoid duplicating MTD core code

From: Lee Jones
Date: Thu Mar 20 2014 - 07:12:18 EST


Reported-by: Brian Norris <computersforpeace@xxxxxxxxx>
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
drivers/mtd/devices/st_spi_fsm.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c
index dcc1dc3..27f9ec9 100644
--- a/drivers/mtd/devices/st_spi_fsm.c
+++ b/drivers/mtd/devices/st_spi_fsm.c
@@ -1728,14 +1728,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;

--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/