summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-11-02 09:12:57 +0800
committerDan Williams <dan.j.williams@intel.com>2010-12-03 01:39:03 -0800
commitcbeae41888bddb2d8c23db281de5f38f4be6a9bb (patch)
treeab4a16f0652337986a5def2929e06865e9fbbfbe /drivers/dma
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')
-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)
return 0;
err_init:
- while (i-- >= 0) {
+ while (--i >= 0) {
struct imxdma_channel *imxdmac = &imxdma->channel[i];
imx_dma_free(imxdmac->imxdma_channel);
}