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>
This commit is contained in:
Axel Lin 2010-11-02 09:12:57 +08:00 committed by Dan Williams
parent e8a7e48bb2
commit cbeae41888
1 changed files with 1 additions and 1 deletions

View 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);
}