Geert Uytterhoeven 3819bc8752 spi: rspi: Fix leaking of unused DMA descriptors
If dmaengine_prep_slave_sg() or dmaengine_submit() fail, we may leak
unused DMA descriptors.

As per Documentation/dmaengine.txt, once a DMA descriptor has been
obtained, it must be submitted. Hence:
  - First prepare and submit all DMA descriptors,
  - Prepare the SPI controller for DMA,
  - Start DMA by calling dma_async_issue_pending(),
  - Make sure to call dmaengine_terminate_all() on all descriptors that
    haven't completed.

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:13:53 -05:00
..
2014-04-14 20:44:15 +01:00
2013-11-14 11:04:38 -08:00
2011-06-06 01:16:30 -06:00
2011-06-06 01:16:30 -06:00
2014-08-08 11:00:26 -07:00
2014-07-07 12:50:52 +02:00
2014-08-05 16:18:13 -07:00