Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 675c496b authored by Liam Girdwood's avatar Liam Girdwood Committed by Mark Brown
Browse files

ASoC: core - Free platform DAPM context at platform removal.



Fix platform removal by freeing the platform DAPM resources and remove
it from the DAPM list.

Signed-off-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent e7c80e2a
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -907,6 +907,10 @@ static void soc_remove_dai_link(struct snd_soc_card *card, int num, int order)
			if (err < 0)
			if (err < 0)
				printk(KERN_ERR "asoc: failed to remove %s\n", platform->name);
				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;
		platform->probed = 0;
		list_del(&platform->card_list);
		list_del(&platform->card_list);
		module_put(platform->dev->driver->owner);
		module_put(platform->dev->driver->owner);