summaryrefslogtreecommitdiffstats
path: root/include/linux/spi
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2014-08-06 14:58:58 +0200
committerMark Brown <broonie@linaro.org>2014-08-16 17:13:53 -0500
commit3819bc8752367eae0d72fa1c473dc88ea45631a7 (patch)
treec3276922453c341ebe0ca35cf48f2d3c959d7bf2 /include/linux/spi
parent7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff)
downloadtalos-op-linux-3819bc8752367eae0d72fa1c473dc88ea45631a7.tar.gz
talos-op-linux-3819bc8752367eae0d72fa1c473dc88ea45631a7.zip
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>
Diffstat (limited to 'include/linux/spi')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud