aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/txx9dmac.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-05-27 08:14:42 -0400
committerVinod Koul <vinod.koul@intel.com>2013-08-05 00:02:25 -0400
commit985a0cb970c9338ac55a1c31b3b8d730eabcfe57 (patch)
tree896b3015abe486f691325c1affa7ca4768ce663e /drivers/dma/txx9dmac.c
parentc14d2bc4709e8d5102a71f222fdd5a2b0c14c669 (diff)
txx9dmac: return DMA_SUCCESS immediately from device_tx_status()
There is no point to go throught the rest of the function if first call to dma_cookie_status() returned DMA_SUCCESS. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/txx9dmac.c')
-rw-r--r--drivers/dma/txx9dmac.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c
index a59fb4841d4c..59357db62359 100644
--- a/drivers/dma/txx9dmac.c
+++ b/drivers/dma/txx9dmac.c
@@ -962,15 +962,14 @@ txx9dmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
962 enum dma_status ret; 962 enum dma_status ret;
963 963
964 ret = dma_cookie_status(chan, cookie, txstate); 964 ret = dma_cookie_status(chan, cookie, txstate);
965 if (ret != DMA_SUCCESS) { 965 if (ret == DMA_SUCCESS)
966 spin_lock_bh(&dc->lock); 966 return DMA_SUCCESS;
967 txx9dmac_scan_descriptors(dc);
968 spin_unlock_bh(&dc->lock);
969 967
970 ret = dma_cookie_status(chan, cookie, txstate); 968 spin_lock_bh(&dc->lock);
971 } 969 txx9dmac_scan_descriptors(dc);
970 spin_unlock_bh(&dc->lock);
972 971
973 return ret; 972 return dma_cookie_status(chan, cookie, txstate);
974} 973}
975 974
976static void txx9dmac_chain_dynamic(struct txx9dmac_chan *dc, 975static void txx9dmac_chain_dynamic(struct txx9dmac_chan *dc,