dma: imx-dma: fix imxdma_probe error path
authorAxel Lin <axel.lin@gmail.com>
Tue, 2 Nov 2010 01:12:57 +0000 (09:12 +0800)
committerDan Williams <dan.j.williams@intel.com>
Fri, 3 Dec 2010 09:39:03 +0000 (01:39 -0800)
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>
drivers/dma/imx-dma.c

index f629e4961af593f0ab5d3697fce77b306ab1ed9b..e53d438142bb8747cb8f288e64d75b0ba2e18a97 100644 (file)
@@ -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);
        }