Skip to content

Commit

Permalink
ASoC: core - Free platform DAPM context at platform removal.
Browse files Browse the repository at this point in the history
Fix platform removal by freeing the platform DAPM resources and remove
it from the DAPM list.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Liam Girdwood authored and Mark Brown committed Jan 16, 2012
1 parent e7c80e2 commit 675c496
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,10 @@ static void soc_remove_dai_link(struct snd_soc_card *card, int num, int order)
if (err < 0)
printk(KERN_ERR "asoc: failed to remove %s\n", platform->name);
}

/* Make sure all DAPM widgets are freed */
snd_soc_dapm_free(&platform->dapm);

platform->probed = 0;
list_del(&platform->card_list);
module_put(platform->dev->driver->owner);
Expand Down

0 comments on commit 675c496

Please sign in to comment.