diff options
Diffstat (limited to 'drivers/mtd/devices/m25p80.c')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 0955a8f4fd25..45cc4a1ae5b0 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -365,9 +365,6 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
365 | t[1].len = len; | 365 | t[1].len = len; |
366 | spi_message_add_tail(&t[1], &m); | 366 | spi_message_add_tail(&t[1], &m); |
367 | 367 | ||
368 | /* Byte count starts at zero. */ | ||
369 | *retlen = 0; | ||
370 | |||
371 | mutex_lock(&flash->lock); | 368 | mutex_lock(&flash->lock); |
372 | 369 | ||
373 | /* Wait till previous write/erase is done. */ | 370 | /* Wait till previous write/erase is done. */ |
@@ -411,8 +408,6 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
411 | pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev), | 408 | pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev), |
412 | __func__, (u32)to, len); | 409 | __func__, (u32)to, len); |
413 | 410 | ||
414 | *retlen = 0; | ||
415 | |||
416 | /* sanity checks */ | 411 | /* sanity checks */ |
417 | if (!len) | 412 | if (!len) |
418 | return(0); | 413 | return(0); |
@@ -500,8 +495,6 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
500 | pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev), | 495 | pr_debug("%s: %s to 0x%08x, len %zd\n", dev_name(&flash->spi->dev), |
501 | __func__, (u32)to, len); | 496 | __func__, (u32)to, len); |
502 | 497 | ||
503 | *retlen = 0; | ||
504 | |||
505 | /* sanity checks */ | 498 | /* sanity checks */ |
506 | if (!len) | 499 | if (!len) |
507 | return 0; | 500 | return 0; |