提交 b9ab9d10 编写于 作者: P Peter Griffin 提交者: Vinod Koul

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: NPeter Griffin <peter.griffin@linaro.org>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 a90e56e5
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册