projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84082d6
)
ARM: mxc: free dma_mask in error path
author
Uwe Kleine-König
<u.kleine-koenig@pengutronix.de>
Fri, 18 Feb 2011 20:59:25 +0000
(21:59 +0100)
committer
Sascha Hauer
<s.hauer@pengutronix.de>
Tue, 1 Mar 2011 13:19:56 +0000
(14:19 +0100)
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>
arch/arm/plat-mxc/devices.c
patch
|
blob
|
history
diff --git
a/arch/arm/plat-mxc/devices.c
b/arch/arm/plat-mxc/devices.c
index e9bcefe79a43d6edb1a18e8ade4b8b3f6bb83619..eee1b6096a0898ce869238cd5b421bca50a6e411 100644
(file)
--- 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);
}