ASoC: nuc900-ac97: fix a memory leak
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
59e2102028
commit
d6f443ae4c
|
@ -384,7 +384,6 @@ out0:
|
||||||
|
|
||||||
static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev)
|
static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
|
|
||||||
snd_soc_unregister_dai(&pdev->dev);
|
snd_soc_unregister_dai(&pdev->dev);
|
||||||
|
|
||||||
clk_put(nuc900_ac97_data->clk);
|
clk_put(nuc900_ac97_data->clk);
|
||||||
|
@ -392,6 +391,7 @@ static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev)
|
||||||
release_mem_region(nuc900_ac97_data->res->start,
|
release_mem_region(nuc900_ac97_data->res->start,
|
||||||
resource_size(nuc900_ac97_data->res));
|
resource_size(nuc900_ac97_data->res));
|
||||||
|
|
||||||
|
kfree(nuc900_ac97_data);
|
||||||
nuc900_ac97_data = NULL;
|
nuc900_ac97_data = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Reference in New Issue