dmaengine: tegra20-apb-dma: Only calculate residue if txstate exists.
authorPeter Griffin <peter.griffin@linaro.org>
Tue, 7 Jun 2016 17:38:40 +0000 (18:38 +0100)
committerVinod Koul <vinod.koul@intel.com>
Tue, 21 Jun 2016 16:05:00 +0000 (21:35 +0530)
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>
drivers/dma/tegra20-apb-dma.c

index 01e316f73559ceb2c45dc487f1972b9c0f0a680e..7f4af8c5b9d66e3dd647ee0a418d811dceeb19a4 100644 (file)
@@ -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);
This page took 0.025491 seconds and 5 git commands to generate.