From: Lars-Peter Clausen Date: Sat, 30 Apr 2011 17:45:47 +0000 (+0200) Subject: ASoC: Free the card's DAPM context X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0aaae527c71e6af571093d90474f37c8662008d5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ASoC: Free the card's DAPM context Free the card's DAPM context when the card is removed. Signed-off-by: Lars-Peter Clausen Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index a823654ef367..6a3cb53185cb 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -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;