spi: pic32: fix dma channels termination

When timeout occurs DMA TX and RX channels should be stopped
instead of stopping RX channel twice time.

Signed-off-by: Cezary Gapinski <cezary.gapinski@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Cezary Gapinski 2019-03-26 22:48:59 +01:00 committed by Mark Brown
parent 0e694df356
commit 94b18a86eb
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -559,7 +559,7 @@ static int pic32_spi_one_transfer(struct spi_master *master,
dev_err(&spi->dev, "wait error/timedout\n");
if (dma_issued) {
dmaengine_terminate_all(master->dma_rx);
dmaengine_terminate_all(master->dma_rx);
dmaengine_terminate_all(master->dma_tx);
}
ret = -ETIMEDOUT;
} else {