dect
/
linux-2.6
Archived
13
0
Fork 0

ARM: mxc: free dma_mask in error path

This fixes a small memory leak that was only hit in very unlikely error
paths

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This commit is contained in:
Uwe Kleine-König 2011-02-18 21:59:25 +01:00 committed by Sascha Hauer
parent 84082d665d
commit c762b293d4
1 changed files with 2 additions and 0 deletions

View File

@ -81,6 +81,8 @@ struct platform_device *__init imx_add_platform_device_dmamask(
ret = platform_device_add(pdev);
if (ret) {
err:
if (dmamask)
kfree(pdev->dev.dma_mask);
platform_device_put(pdev);
return ERR_PTR(ret);
}