aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-mxc/devices.c')
-rw-r--r--arch/arm/plat-mxc/devices.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices.c b/arch/arm/plat-mxc/devices.c
index e9bcefe79a4..eee1b6096a0 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);
}