diff options
Diffstat (limited to 'drivers/mtd/spi/spi_flash.c')
-rw-r--r-- | drivers/mtd/spi/spi_flash.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 111185a..6fa932c 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -150,8 +150,10 @@ int spi_flash_cmd_read_fast(struct spi_flash *flash, u32 offset, u8 cmd[5]; /* Handle memory-mapped SPI */ - if (flash->memory_map) + if (flash->memory_map) { memcpy(data, flash->memory_map + offset, len); + return 0; + } cmd[0] = CMD_READ_ARRAY_FAST; spi_flash_addr(offset, cmd); |