Thread (20 messages) 20 messages, 5 authors, 2016-06-28
STALE3625d

[PATCH 7/8] dmaengine: tegra20-apb-dma: Only calculate residue if txstate exists.

From: peter.griffin@linaro.org (Peter Griffin)
Date: 2016-06-07 17:40:42
Also in: linux-tegra, linuxppc-dev, lkml
Subsystem: dma generic offload engine subsystem, tegra dma drivers, the rest · Maintainers: Vinod Koul, Laxman Dewangan, Jon Hunter, Linus Torvalds

There is no point calculating the residue if there is
no txstate to store the value.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 drivers/dma/tegra20-apb-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 01e316f..7f4af8c 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -814,7 +814,7 @@ static enum dma_status tegra_dma_tx_status(struct dma_chan *dc,
 	unsigned int residual;
 
 	ret = dma_cookie_status(dc, cookie, txstate);
-	if (ret == DMA_COMPLETE)
+	if (ret == DMA_COMPLETE || !txstate)
 		return ret;
 
 	spin_lock_irqsave(&tdc->lock, flags);
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help