Skip to content

Commit

Permalink
dma: imx-dma: fix imxdma_probe error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Dan Williams committed Dec 3, 2010
1 parent e8a7e48 commit cbeae41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/imx-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit cbeae41

Please sign in to comment.