projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c3f2d7
)
ARM: mxs: free dma_mask in error path
author
Lothar Waßmann
<LW@KARO-electronics.de>
Wed, 15 Dec 2010 21:11:31 +0000
(22:11 +0100)
committer
Sascha Hauer
<s.hauer@pengutronix.de>
Tue, 1 Mar 2011 13:19:55 +0000
(14:19 +0100)
This fixes a small memory leak that was only hit in very unlikely error
paths.
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
arch/arm/mach-mxs/devices.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/arm/mach-mxs/devices.c
b/arch/arm/mach-mxs/devices.c
index c20d54740b0ba338c1286593e6cd6e5c215f4776..cfdb6b284702d75fb38cbf79fd97b4331ee46600 100644
(file)
--- a/
arch/arm/mach-mxs/devices.c
+++ b/
arch/arm/mach-mxs/devices.c
@@
-66,6
+66,8
@@
struct platform_device *__init mxs_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);
}