aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-10-20 02:37:19 -0400
committerDan Williams <dan.j.williams@intel.com>2010-10-22 14:08:27 -0400
commit8267f16e8b67ea272f37f7072933dc0d3839693d (patch)
tree672a25b5bb2db8c1a440d0221d1069231071f6aa /drivers/dma
parent42e55736f7efd7658f8826a5f441c3ccb962db74 (diff)
dma: imx-dma: fix signedness bug
mxdmac->channel was unsigned, so check (imxdmac->channel < 0) for failed imx_dma_request_by_prio() made no sence. Explicitly check signed values. Also, fix uninitialzed use of ret. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/imx-dma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 346be6218058..f629e4961af5 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -335,8 +335,10 @@ static int __init imxdma_probe(struct platform_device *pdev)
335 335
336 imxdmac->imxdma_channel = imx_dma_request_by_prio("dmaengine", 336 imxdmac->imxdma_channel = imx_dma_request_by_prio("dmaengine",
337 DMA_PRIO_MEDIUM); 337 DMA_PRIO_MEDIUM);
338 if (imxdmac->channel < 0) 338 if ((int)imxdmac->channel < 0) {
339 ret = -ENODEV;
339 goto err_init; 340 goto err_init;
341 }
340 342
341 imx_dma_setup_handlers(imxdmac->imxdma_channel, 343 imx_dma_setup_handlers(imxdmac->imxdma_channel,
342 imxdma_irq_handler, imxdma_err_handler, imxdmac); 344 imxdma_irq_handler, imxdma_err_handler, imxdmac);