diff options
author | Peter Griffin | 2016-06-07 18:38:37 +0100 |
---|---|---|
committer | Vinod Koul | 2016-06-21 21:35:00 +0530 |
commit | e841b80f450ba788c4855af5cc4c535ed9ab7e47 (patch) | |
tree | ef5fb8e921116448ead64e99ae7c224c4692a49a /drivers/dma/s3c24xx-dma.c | |
parent | 95b0aa3e10b08b9ee20b5f5e19d162d049744a9b (diff) |
dmaengine: s3c24xx: Simplify code in s3c24xx_dma_tx_status()
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>
Diffstat (limited to 'drivers/dma/s3c24xx-dma.c')
-rw-r--r-- | drivers/dma/s3c24xx-dma.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c index 17ccdfd28f37..f7d2c7a00496 100644 --- a/drivers/dma/s3c24xx-dma.c +++ b/drivers/dma/s3c24xx-dma.c @@ -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; } |