diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-02-18 21:59:25 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-03-01 14:19:56 +0100 |
commit | c762b293d4a12fb726cec62cfe3e64f66cf3103f (patch) | |
tree | 84c790174413b9e4f18c8c114fe6267e0eb73545 /arch/arm/plat-mxc/devices.c | |
parent | ARM: mxs: free dma_mask in error path (diff) | |
download | linux-c762b293d4a12fb726cec62cfe3e64f66cf3103f.tar.xz linux-c762b293d4a12fb726cec62cfe3e64f66cf3103f.zip |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices.c b/arch/arm/plat-mxc/devices.c index e9bcefe79a43..eee1b6096a08 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); } |