From: Cezary Gapinski Date: Tue, 26 Mar 2019 21:48:59 +0000 (+0100) Subject: spi: pic32: fix dma channels termination X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=94b18a86eb5c82c5778bfb1ce815651f0e331bb5;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-pic32.c b/drivers/spi/spi-pic32.c index 131849adc570..d9f374c8b709 100644 --- a/drivers/spi/spi-pic32.c +++ b/drivers/spi/spi-pic32.c @@ -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 {