diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-02-18 15:59:25 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-03-01 08:19:56 -0500 |
commit | c762b293d4a12fb726cec62cfe3e64f66cf3103f (patch) | |
tree | 84c790174413b9e4f18c8c114fe6267e0eb73545 | |
parent | 84082d665dc62e632e21213fda8b22c0b8c25b81 (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>
-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( | |||
81 | ret = platform_device_add(pdev); | 81 | ret = platform_device_add(pdev); |
82 | if (ret) { | 82 | if (ret) { |
83 | err: | 83 | err: |
84 | if (dmamask) | ||
85 | kfree(pdev->dev.dma_mask); | ||
84 | platform_device_put(pdev); | 86 | platform_device_put(pdev); |
85 | return ERR_PTR(ret); | 87 | return ERR_PTR(ret); |
86 | } | 88 | } |