mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
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>
This commit is contained in:
parent
3f9d720a4d
commit
0419a203f8
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user