From c762b293d4a12fb726cec62cfe3e64f66cf3103f Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Fri, 18 Feb 2011 21:59:25 +0100 Subject: ARM: mxc: free dma_mask in error path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a small memory leak that was only hit in very unlikely error paths Signed-off-by: Uwe Kleine-König --- arch/arm/plat-mxc/devices.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm') 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); } -- cgit v1.2.3-70-g09d2