summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs
diff options
context:
space:
mode:
authorLothar Waßmann2010-12-15 22:11:31 +0100
committerSascha Hauer2011-03-01 14:19:55 +0100
commit84082d665dc62e632e21213fda8b22c0b8c25b81 (patch)
tree478052614c02a2f512a2a6ce5a71fab8fd83bc6c /arch/arm/mach-mxs
parentcpuimx51sd: mcp2515 supports up to 10MHz SPI clock (diff)
downloadkernel-qcow2-linux-84082d665dc62e632e21213fda8b22c0b8c25b81.tar.gz
kernel-qcow2-linux-84082d665dc62e632e21213fda8b22c0b8c25b81.tar.xz
kernel-qcow2-linux-84082d665dc62e632e21213fda8b22c0b8c25b81.zip
ARM: mxs: free dma_mask in error path
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>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r--arch/arm/mach-mxs/devices.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c
index c20d54740b0b..cfdb6b284702 100644
--- 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);
}