aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/s3c24xx-dma.c
diff options
context:
space:
mode:
authorPeter Griffin <peter.griffin@linaro.org>2016-06-07 13:38:37 -0400
committerVinod Koul <vinod.koul@intel.com>2016-06-21 12:05:00 -0400
commite841b80f450ba788c4855af5cc4c535ed9ab7e47 (patch)
treeef5fb8e921116448ead64e99ae7c224c4692a49a /drivers/dma/s3c24xx-dma.c
parent95b0aa3e10b08b9ee20b5f5e19d162d049744a9b (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.c6
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,
768 768
769 spin_lock_irqsave(&s3cchan->vc.lock, flags); 769 spin_lock_irqsave(&s3cchan->vc.lock, flags);
770 ret = dma_cookie_status(chan, cookie, txstate); 770 ret = dma_cookie_status(chan, cookie, txstate);
771 if (ret == DMA_COMPLETE) {
772 spin_unlock_irqrestore(&s3cchan->vc.lock, flags);
773 return ret;
774 }
775 771
776 /* 772 /*
777 * There's no point calculating the residue if there's 773 * There's no point calculating the residue if there's
778 * no txstate to store the value. 774 * no txstate to store the value.
779 */ 775 */
780 if (!txstate) { 776 if (ret == DMA_COMPLETE || !txstate) {
781 spin_unlock_irqrestore(&s3cchan->vc.lock, flags); 777 spin_unlock_irqrestore(&s3cchan->vc.lock, flags);
782 return ret; 778 return ret;
783 } 779 }