Skip to contentSkip to conversation

ASoC: max98088 - fix a memory leak

PATCH Applied Axel Lin 3 participants 5 messages Nov 23, 2010

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/3 ASoC: max98088 - fix a memory leak

---
 sound/soc/codecs/max98088.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
sound/soc/codecs/max98088.c +3 -0
index 4ee5b1a..b679586 100644
@@ -2020,7 +2020,10 @@ err_access:
 
 static int max98088_remove(struct snd_soc_codec *codec)
 {
+       struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
+
        max98088_set_bias_level(codec, SND_SOC_BIAS_OFF);
+       kfree(max98088->eq_texts);
 
        return 0;
 }
Signature · 1 line
1.7.2
author
#1 lore raw

PATCH 2/3 ASoC: wm8904 - fix memory leaks

---
 sound/soc/codecs/wm8904.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8904.c +2 -0
index da91928..d0024666 100644
@@ -2498,6 +2498,8 @@ static int wm8904_remove(struct snd_soc_codec *codec)
 
 	wm8904_set_bias_level(codec, SND_SOC_BIAS_OFF);
 	regulator_bulk_free(ARRAY_SIZE(wm8904->supplies), wm8904->supplies);
+	kfree(wm8904->retune_mobile_texts);
+	kfree(wm8904->drc_texts);
 
 	return 0;
 }
Signature · 1 line
1.7.2
author
#2 lore raw

PATCH 3/3 ASoC: wm8994 - fix memory leaks

---
 sound/soc/codecs/wm8994.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8994.c +2 -0
index 63a3895..2833994 100644
@@ -2503,6 +2503,8 @@ static int  wm8994_codec_remove(struct snd_soc_codec *codec)
 	wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC2_DET, wm8994);
 	wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_SHRT, wm8994);
 	wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_DET, wm8994);
+	kfree(wm8994->retune_mobile_texts);
+	kfree(wm8994->drc_texts);
 	kfree(wm8994);
 
 	return 0;
Signature · 1 line
1.7.2
Acked-by on v1 1/3
#3 lore raw
In reply to Axel Lin
Quoted 10 lines · Axel Lin
---
 sound/soc/codecs/max98088.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
sound/soc/codecs/max98088.c +0 -0
index 4ee5b1a..b679586 100644

sound/soc/codecs/max98088.c err_access: · line 2029

Quoted 10 lines
sound/soc/codecs/max98088.c +3 -0
@@ -2020,7 +2020,10 @@ err_access:
 
 static int max98088_remove(struct snd_soc_codec *codec)
 {
+       struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
+
        max98088_set_bias_level(codec, SND_SOC_BIAS_OFF);
+       kfree(max98088->eq_texts);
 
        return 0;
 }

All

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk