]> git.karo-electronics.de Git - linux-beck.git/commitdiff
dmaengine: s3c24xx: Simplify code in s3c24xx_dma_tx_status()
authorPeter Griffin <peter.griffin@linaro.org>
Tue, 7 Jun 2016 17:38:37 +0000 (18:38 +0100)
committerVinod Koul <vinod.koul@intel.com>
Tue, 21 Jun 2016 16:05:00 +0000 (21:35 +0530)
Doing so saves a few lines of code in the driver.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/s3c24xx-dma.c

index 17ccdfd28f3702d7de7b0b98299262a36690df85..f7d2c7a0049638225b2b264f406f5fefc409aa76 100644 (file)
@@ -768,16 +768,12 @@ static enum dma_status s3c24xx_dma_tx_status(struct dma_chan *chan,
 
        spin_lock_irqsave(&s3cchan->vc.lock, flags);
        ret = dma_cookie_status(chan, cookie, txstate);
-       if (ret == DMA_COMPLETE) {
-               spin_unlock_irqrestore(&s3cchan->vc.lock, flags);
-               return ret;
-       }
 
        /*
         * There's no point calculating the residue if there's
         * no txstate to store the value.
         */
-       if (!txstate) {
+       if (ret == DMA_COMPLETE || !txstate) {
                spin_unlock_irqrestore(&s3cchan->vc.lock, flags);
                return ret;
        }