summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Griffin <peter.griffin@linaro.org>2016-06-07 18:38:40 +0100
committerVinod Koul <vinod.koul@intel.com>2016-06-21 21:35:00 +0530
commit71f7e6cc55003ca6f616ff4094253d28de5d9254 (patch)
tree0e97aa6bad67fb634836a688258ace0c294cf075
parentb9ab9d10d9898cd022fece44a474e5ddb785d639 (diff)
downloadlinux-71f7e6cc55003ca6f616ff4094253d28de5d9254.tar.bz2
dmaengine: tegra20-apb-dma: Only calculate residue if txstate exists.
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> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/tegra20-apb-dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 01e316f73559..7f4af8c5b9d6 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);