Commit 985a0cb9 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Vinod Koul

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent c14d2bc4
...@@ -962,15 +962,14 @@ txx9dmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie, ...@@ -962,15 +962,14 @@ txx9dmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
enum dma_status ret; enum dma_status ret;
ret = dma_cookie_status(chan, cookie, txstate); ret = dma_cookie_status(chan, cookie, txstate);
if (ret != DMA_SUCCESS) { if (ret == DMA_SUCCESS)
spin_lock_bh(&dc->lock); return DMA_SUCCESS;
txx9dmac_scan_descriptors(dc);
spin_unlock_bh(&dc->lock);
ret = dma_cookie_status(chan, cookie, txstate); spin_lock_bh(&dc->lock);
} txx9dmac_scan_descriptors(dc);
spin_unlock_bh(&dc->lock);
return ret; return dma_cookie_status(chan, cookie, txstate);
} }
static void txx9dmac_chain_dynamic(struct txx9dmac_chan *dc, static void txx9dmac_chain_dynamic(struct txx9dmac_chan *dc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment