mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	dmaengine: tegra20-apb-dma: Only calculate residue if txstate exists.
There is no point calculating the residue if there is no txstate to store the value. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
		
							parent
							
								
									b9ab9d10d9
								
							
						
					
					
						commit
						71f7e6cc55
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -814,7 +814,7 @@ static enum dma_status tegra_dma_tx_status(struct dma_chan *dc,
 | 
			
		|||
	unsigned int residual;
 | 
			
		||||
 | 
			
		||||
	ret = dma_cookie_status(dc, cookie, txstate);
 | 
			
		||||
	if (ret == DMA_COMPLETE)
 | 
			
		||||
	if (ret == DMA_COMPLETE || !txstate)
 | 
			
		||||
		return ret;
 | 
			
		||||
 | 
			
		||||
	spin_lock_irqsave(&tdc->lock, flags);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue