Pārlūkot izejas kodu

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>
Lee Jones 11 gadi atpakaļ
vecāks
revīzija
0419a203f8
1 mainītis faili ar 0 papildinājumiem un 8 dzēšanām
  1. 0 8
      drivers/mtd/devices/st_spi_fsm.c

+ 0 - 8
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;