spi: pic32: fix dma channels termination
authorCezary Gapinski <cezary.gapinski@gmail.com>
Tue, 26 Mar 2019 21:48:59 +0000 (22:48 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 1 Apr 2019 08:24:47 +0000 (15:24 +0700)
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>
drivers/spi/spi-pic32.c

index 131849adc57072e2a1e73874dc55a1bab4eb01a0..d9f374c8b7092fe18c4777a7dc739b6ba7b4392b 100644 (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 {