aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-omap/mcbsp.c
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2010-12-07 16:25:40 -0800
committerTony Lindgren <tony@atomide.com>2010-12-07 16:25:40 -0800
commit5f3b7284cb35c9e3eead279cb35f017b9735bb43 (patch)
tree3209cd1cd21e96fd5abaae88acacc00fb46f4c38 /arch/arm/plat-omap/mcbsp.c
parentb1cc4c55c69efed3ebbb2a13e4c77a2a1a4a6bc9 (diff)
omap: McBSP: Fix potential memory leak in omap_mcbsp_remove
Function omap_mcbsp_probe allocates struct omap_mcbsp *mcbsp but it is not freed in omap_mcbsp_remove. Fix this, remove unneeded structure cleanups and clk_disable calls since they are not needed here. This is not problem currently but becomes if the mcbsp driver is ever modularized. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/mcbsp.c')
-rw-r--r--arch/arm/plat-omap/mcbsp.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index eac4b978e9f..f79090cb823 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -1836,17 +1836,11 @@ static int __devexit omap_mcbsp_remove(struct platform_device *pdev)
omap34xx_device_exit(mcbsp);
- clk_disable(mcbsp->fclk);
- clk_disable(mcbsp->iclk);
clk_put(mcbsp->fclk);
clk_put(mcbsp->iclk);
iounmap(mcbsp->io_base);
-
- mcbsp->fclk = NULL;
- mcbsp->iclk = NULL;
- mcbsp->free = 0;
- mcbsp->dev = NULL;
+ kfree(mcbsp);
}
return 0;