aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/devices.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-02-18 21:59:25 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-03-01 14:19:56 +0100
commitc762b293d4a12fb726cec62cfe3e64f66cf3103f (patch)
tree84c790174413b9e4f18c8c114fe6267e0eb73545 /arch/arm/plat-mxc/devices.c
parent84082d665dc62e632e21213fda8b22c0b8c25b81 (diff)
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>
Diffstat (limited to 'arch/arm/plat-mxc/devices.c')
-rw-r--r--arch/arm/plat-mxc/devices.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices.c b/arch/arm/plat-mxc/devices.c
index e9bcefe79a4..eee1b6096a0 100644
--- a/arch/arm/plat-mxc/devices.c
+++ b/arch/arm/plat-mxc/devices.c
@@ -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);
}