summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2019-04-26 13:00:27 -0400
committerVinod Koul <vkoul@kernel.org>2019-04-29 00:29:07 -0400
commitc6504be53972cd57326196eb2a18b2b182c26c5c (patch)
tree3311b7000b09a02812045565fa3786cd02e72440
parentf4fd2ec08f17b34f1c7c18414d5fc882efd51e83 (diff)
dmaengine: stm32-dma: Fix unsigned variable compared with zero
Commit f4fd2ec08f17: ("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: f4fd2ec08f17 ("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>
-rw-r--r--drivers/dma/stm32-dma.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
index 33068185c0fe..dde796686736 100644
--- a/drivers/dma/stm32-dma.c
+++ b/drivers/dma/stm32-dma.c
@@ -1303,13 +1303,15 @@ static int stm32_dma_probe(struct platform_device *pdev)
1303 for (i = 0; i < STM32_DMA_MAX_CHANNELS; i++) { 1303 for (i = 0; i < STM32_DMA_MAX_CHANNELS; i++) {
1304 chan = &dmadev->chan[i]; 1304 chan = &dmadev->chan[i];
1305 chan->irq = platform_get_irq(pdev, i); 1305 chan->irq = platform_get_irq(pdev, i);
1306 if (chan->irq < 0) { 1306 ret = platform_get_irq(pdev, i);
1307 ret = chan->irq; 1307 if (ret < 0) {
1308 if (ret != -EPROBE_DEFER) 1308 if (ret != -EPROBE_DEFER)
1309 dev_err(&pdev->dev, 1309 dev_err(&pdev->dev,
1310 "No irq resource for chan %d\n", i); 1310 "No irq resource for chan %d\n", i);
1311 goto err_unregister; 1311 goto err_unregister;
1312 } 1312 }
1313 chan->irq = ret;
1314
1313 ret = devm_request_irq(&pdev->dev, chan->irq, 1315 ret = devm_request_irq(&pdev->dev, chan->irq,
1314 stm32_dma_chan_irq, 0, 1316 stm32_dma_chan_irq, 0,
1315 dev_name(chan2dev(chan)), chan); 1317 dev_name(chan2dev(chan)), chan);