diff options
author | Jarkko Nikula <jhnikula@gmail.com> | 2010-12-07 19:25:40 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-07 19:25:40 -0500 |
commit | 5f3b7284cb35c9e3eead279cb35f017b9735bb43 (patch) | |
tree | 3209cd1cd21e96fd5abaae88acacc00fb46f4c38 /arch/arm/plat-omap | |
parent | b1cc4c55c69efed3ebbb2a13e4c77a2a1a4a6bc9 (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')
-rw-r--r-- | arch/arm/plat-omap/mcbsp.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index eac4b978e9fd..f79090cb823b 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) | |||
1836 | 1836 | ||
1837 | omap34xx_device_exit(mcbsp); | 1837 | omap34xx_device_exit(mcbsp); |
1838 | 1838 | ||
1839 | clk_disable(mcbsp->fclk); | ||
1840 | clk_disable(mcbsp->iclk); | ||
1841 | clk_put(mcbsp->fclk); | 1839 | clk_put(mcbsp->fclk); |
1842 | clk_put(mcbsp->iclk); | 1840 | clk_put(mcbsp->iclk); |
1843 | 1841 | ||
1844 | iounmap(mcbsp->io_base); | 1842 | iounmap(mcbsp->io_base); |
1845 | 1843 | kfree(mcbsp); | |
1846 | mcbsp->fclk = NULL; | ||
1847 | mcbsp->iclk = NULL; | ||
1848 | mcbsp->free = 0; | ||
1849 | mcbsp->dev = NULL; | ||
1850 | } | 1844 | } |
1851 | 1845 | ||
1852 | return 0; | 1846 | return 0; |