mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
dmaengine: sun6i-dma: Only calculate residue if state exists.
There is no point in calculating the residue if state does not exist to store the value. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
a90e56e5b1
commit
b9ab9d10d9
1 changed files with 1 additions and 1 deletions
|
|
@ -865,7 +865,7 @@ static enum dma_status sun6i_dma_tx_status(struct dma_chan *chan,
|
|||
size_t bytes = 0;
|
||||
|
||||
ret = dma_cookie_status(chan, cookie, state);
|
||||
if (ret == DMA_COMPLETE)
|
||||
if (ret == DMA_COMPLETE || !state)
|
||||
return ret;
|
||||
|
||||
spin_lock_irqsave(&vchan->vc.lock, flags);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue