Skip to contentSkip to conversation

ASoC: nuc900-ac97: fix a memory leak

PATCH Applied Axel Lin 4 participants 4 messages Nov 24, 2010

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: nuc900-ac97: fix a memory leak

---
 sound/soc/nuc900/nuc900-ac97.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/nuc900/nuc900-ac97.c +1 -1
index 293dc74..e00e39d 100644
@@ -384,7 +384,6 @@ out0:
 
 static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev)
 {
-
 	snd_soc_unregister_dai(&pdev->dev);
 
 	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,
 				resource_size(nuc900_ac97_data->res));
 
+	kfree(nuc900_ac97_data);
 	nuc900_ac97_data = NULL;
 
 	return 0;
Signature · 1 line
1.7.2
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Axel Lin
---
 sound/soc/nuc900/nuc900-ac97.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/nuc900/nuc900-ac97.c +0 -1
index 293dc74..e00e39d 100644
@@ -384,7 +384,6 @@ out0:
 
 static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev)
 {
-
 	snd_soc_unregister_dai(&pdev->dev);
 
 	clk_put(nuc900_ac97_data->clk);

sound/soc/nuc900/nuc900-ac97.c static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev) · line 397

Quoted 7 lines
sound/soc/nuc900/nuc900-ac97.c +1 -0
@@ -392,6 +391,7 @@ static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev)
 	release_mem_region(nuc900_ac97_data->res->start,
 				resource_size(nuc900_ac97_data->res));
 
+	kfree(nuc900_ac97_data);
 	nuc900_ac97_data = NULL;
 
 	return 0;
Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
Acked-by
#2 lore raw

2010/11/24 Liam Girdwood <[email protected]>:

Quoted 22 lines · Axel Lin
Quoted 21 lines

---
 sound/soc/nuc900/nuc900-ac97.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/nuc900/nuc900-ac97.c +0 -1
index 293dc74..e00e39d 100644
@@ -384,7 +384,6 @@ out0:
 
  static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev)
  {
-
       snd_soc_unregister_dai(&pdev->dev);
 
       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,
                               resource_size(nuc900_ac97_data->res));
 
Quoted 7 lines

sound/soc/nuc900/nuc900-ac97.c static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev) · line 397

Quoted 4 lines
sound/soc/nuc900/nuc900-ac97.c +1 -0
+     kfree(nuc900_ac97_data);
       nuc900_ac97_data = NULL;
 
       return 0;

thanks!

Quoted 6 lines

--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

Signature · 10 lines
*linux-arm-kernel mailing list
mail addr:[email protected]
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

* linux-arm-NUC900 mailing list
mail addr:[email protected]
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
[email protected]