Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9ab9d10 authored by Peter Griffin's avatar Peter Griffin Committed by Vinod Koul
Browse files

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: default avatarPeter Griffin <peter.griffin@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent a90e56e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);