ASoC: Free the card's DAPM context
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 30 Apr 2011 17:45:47 +0000 (19:45 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 3 May 2011 17:43:15 +0000 (18:43 +0100)
Free the card's DAPM context when the card is removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c

index a823654ef36707faf223be14d383e1c08698866e..6a3cb53185cbc19f40efee90a7a7bbd277f7c1a3 100644 (file)
@@ -2047,6 +2047,8 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card)
        if (card->remove)
                card->remove(card);
 
+       snd_soc_dapm_free(&card->dapm);
+
        kfree(card->rtd);
        snd_card_free(card->snd_card);
        return 0;