aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/imx-dma.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-11-01 21:12:57 -0400
committerDan Williams <dan.j.williams@intel.com>2010-12-03 04:39:03 -0500
commitcbeae41888bddb2d8c23db281de5f38f4be6a9bb (patch)
treeab4a16f0652337986a5def2929e06865e9fbbfbe /drivers/dma/imx-dma.c
parente8a7e48bb248a1196484d3f8afa53bded2b24e71 (diff)
dma: imx-dma: fix imxdma_probe error path
otherwise, i will be -1 inside the latest iteration of the while loop. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/imx-dma.c')
-rw-r--r--drivers/dma/imx-dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index f629e4961af5..e53d438142bb 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -379,7 +379,7 @@ static int __init imxdma_probe(struct platform_device *pdev)
379 return 0; 379 return 0;
380 380
381err_init: 381err_init:
382 while (i-- >= 0) { 382 while (--i >= 0) {
383 struct imxdma_channel *imxdmac = &imxdma->channel[i]; 383 struct imxdma_channel *imxdmac = &imxdma->channel[i];
384 imx_dma_free(imxdmac->imxdma_channel); 384 imx_dma_free(imxdmac->imxdma_channel);
385 } 385 }