spi: pxa2xx: handle error of pxa2xx_spi_dma_prepare()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 24 Mar 2016 13:35:42 +0000 (15:35 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 28 Mar 2016 09:41:44 +0000 (10:41 +0100)
commit7d1f1bf699efc9b0f0e92c910dc667a4511943f5
tree07cff0023ebbd3516e4a2f2e4898ecfe2602b0f7
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca
spi: pxa2xx: handle error of pxa2xx_spi_dma_prepare()

If by some reason pxa2xx_spi_dma_prepare() fails we have not to ignore its
error. In such case we abort the transfer and return the error to upper
level.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Jarkko: Avoid leaking TX descriptors in case RX descriptor allocation
fails. Noted by Robert Jarzmik <robert.jarzmik@free.fr>.
Unmap also buffers in case of failure.]
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx-dma.c
drivers/spi/spi-pxa2xx.c