From: Lee Jones Date: Thu, 20 Mar 2014 11:11:44 +0000 (+0000) Subject: mtd: st_spi_fsm: Avoid duplicating MTD core code X-Git-Tag: v3.15-rc1~65^2~13 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=0419a203f865603654953f407cf062309330f37e;p=linux.git mtd: st_spi_fsm: Avoid duplicating MTD core code Reported-by: Brian Norris Signed-off-by: Lee Jones Signed-off-by: Brian Norris --- 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;