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