diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2018-10-16 09:13:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-21 09:19:19 +0100 |
commit | 9e9dd0f1c345ba9b4d3d409345aa362815785bf5 (patch) | |
tree | 431b02ceea8d84386cff1021d770202b63200669 /drivers/mtd | |
parent | 218b6e82d07f8802a887fd074510c65df8c25101 (diff) | |
download | linux-stable-9e9dd0f1c345ba9b4d3d409345aa362815785bf5.tar.gz linux-stable-9e9dd0f1c345ba9b4d3d409345aa362815785bf5.tar.bz2 linux-stable-9e9dd0f1c345ba9b4d3d409345aa362815785bf5.zip |
mtd: spi-nor: cadence-quadspi: Return error code in cqspi_direct_read_execute()
commit 91d7b67000c6e9bd605624079fee5a084238ad92 upstream.
We return 0 unconditionally in 'cqspi_direct_read_execute()'.
However, 'ret' is set to some error codes in several error handling
paths.
Return 'ret' instead to propagate the error code.
Fixes: ffa639e069fb ("mtd: spi-nor: cadence-quadspi: Add DMA support for direct mode reads")
Cc: <stable@vger.kernel.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/spi-nor/cadence-quadspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c index 8e714fbfa521..6e9cbd1a0b6d 100644 --- a/drivers/mtd/spi-nor/cadence-quadspi.c +++ b/drivers/mtd/spi-nor/cadence-quadspi.c @@ -996,7 +996,7 @@ static int cqspi_direct_read_execute(struct spi_nor *nor, u_char *buf, err_unmap: dma_unmap_single(nor->dev, dma_dst, len, DMA_DEV_TO_MEM); - return 0; + return ret; } static ssize_t cqspi_read(struct spi_nor *nor, loff_t from, |