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>
This commit is contained in:
Jarkko Nikula 2010-12-07 16:25:40 -08:00 коммит произвёл Tony Lindgren
Родитель b1cc4c55c6
Коммит 5f3b7284cb
1 изменённых файлов: 1 добавлений и 7 удалений

Просмотреть файл

@ -1836,17 +1836,11 @@ static int __devexit omap_mcbsp_remove(struct platform_device *pdev)
omap34xx_device_exit(mcbsp); omap34xx_device_exit(mcbsp);
clk_disable(mcbsp->fclk);
clk_disable(mcbsp->iclk);
clk_put(mcbsp->fclk); clk_put(mcbsp->fclk);
clk_put(mcbsp->iclk); clk_put(mcbsp->iclk);
iounmap(mcbsp->io_base); iounmap(mcbsp->io_base);
kfree(mcbsp);
mcbsp->fclk = NULL;
mcbsp->iclk = NULL;
mcbsp->free = 0;
mcbsp->dev = NULL;
} }
return 0; return 0;