mtd: spi-nor: cadence-quadspi: Return error code in cqspi_direct_read_execute()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 16 Oct 2018 07:13:46 +0000 (09:13 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Mon, 5 Nov 2018 22:52:18 +0000 (23:52 +0100)
commit91d7b67000c6e9bd605624079fee5a084238ad92
tree31d08cbec7813a5d93b73dce6d904f457f209272
parentd098093ba06eb032057d1aca1c2e45889e099d00
mtd: spi-nor: cadence-quadspi: Return error code in cqspi_direct_read_execute()

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>
drivers/mtd/spi-nor/cadence-quadspi.c