aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-mxs/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mxs/devices.c')
-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 c20d54740b0..cfdb6b28470 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);
}