mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	dmaengine: stm32-dma: Fix unsigned variable compared with zero
Commitf4fd2ec08f: ("dmaengine: stm32-dma: use platform_get_irq()") used unsigned variable irq to store the results and check later for negative errors, so update the code to use signed variable for this Fixes:f4fd2ec08f("dmaengine: stm32-dma: use platform_get_irq()") Reported-by: kbuild test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@lip6.fr> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
		
							parent
							
								
									f4fd2ec08f
								
							
						
					
					
						commit
						c6504be539
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -1303,13 +1303,15 @@ static int stm32_dma_probe(struct platform_device *pdev) | ||||||
| 	for (i = 0; i < STM32_DMA_MAX_CHANNELS; i++) { | 	for (i = 0; i < STM32_DMA_MAX_CHANNELS; i++) { | ||||||
| 		chan = &dmadev->chan[i]; | 		chan = &dmadev->chan[i]; | ||||||
| 		chan->irq = platform_get_irq(pdev, i); | 		chan->irq = platform_get_irq(pdev, i); | ||||||
| 		if (chan->irq < 0)  { | 		ret = platform_get_irq(pdev, i); | ||||||
| 			ret = chan->irq; | 		if (ret < 0)  { | ||||||
| 			if (ret != -EPROBE_DEFER) | 			if (ret != -EPROBE_DEFER) | ||||||
| 				dev_err(&pdev->dev, | 				dev_err(&pdev->dev, | ||||||
| 					"No irq resource for chan %d\n", i); | 					"No irq resource for chan %d\n", i); | ||||||
| 			goto err_unregister; | 			goto err_unregister; | ||||||
| 		} | 		} | ||||||
|  | 		chan->irq = ret; | ||||||
|  | 
 | ||||||
| 		ret = devm_request_irq(&pdev->dev, chan->irq, | 		ret = devm_request_irq(&pdev->dev, chan->irq, | ||||||
| 				       stm32_dma_chan_irq, 0, | 				       stm32_dma_chan_irq, 0, | ||||||
| 				       dev_name(chan2dev(chan)), chan); | 				       dev_name(chan2dev(chan)), chan); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Vinod Koul
						Vinod Koul