提交 e841b80f 编写于 作者: P Peter Griffin 提交者: Vinod Koul

dmaengine: s3c24xx: Simplify code in s3c24xx_dma_tx_status()

Doing so saves a few lines of code in the driver.
Signed-off-by: NPeter Griffin <peter.griffin@linaro.org>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 95b0aa3e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册