[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1465321121-22238-8-git-send-email-peter.griffin@linaro.org>
Date: Tue, 7 Jun 2016 18:38:40 +0100
From: Peter Griffin <peter.griffin@...aro.org>
To: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kernel@...inux.com, vinod.koul@...el.com, linus.walleij@...aro.org,
dan.j.williams@...el.com, leoli@...escale.com, zw@...kernel.org,
baohua@...nel.org, maxime.ripard@...e-electrons.com, wens@...e.org,
ldewangan@...dia.com, jonathanh@...dia.com, swarren@...dotorg.org,
thierry.reding@...il.com, gnurou@...il.com
Cc: peter.griffin@...aro.org, lee.jones@...aro.org,
dmaengine@...r.kernel.org, linux-tegra@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org
Subject: [PATCH 7/8] 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@...aro.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
Powered by blists - more mailing lists