ASoC: pxa-ssp: fix a memory leak in pxa_ssp_remove()
authorAxel Lin <axel.lin@gmail.com>
Wed, 25 Aug 2010 08:59:11 +0000 (16:59 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 25 Aug 2010 13:20:15 +0000 (14:20 +0100)
The "priv" allocated in pxa_ssp_probe() should be kfreed in pxa_ssp_remove().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/pxa/pxa-ssp.c

index 8dfbcda956ffb725d1114d149ae5c47b3e16a0e8..b439eee462cb720ec622628fa78b955e846980ae 100644 (file)
@@ -758,6 +758,7 @@ static int pxa_ssp_remove(struct snd_soc_dai *dai)
        struct ssp_priv *priv = snd_soc_dai_get_drvdata(dai);
 
        pxa_ssp_free(priv->ssp);
+       kfree(priv);
        return 0;
 }