diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ec554c3bdafc378d28b037f96681c5196813a389..d8b092f129aed81c73d8a5f1a23e80269c09c049 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -939,9 +939,6 @@ void snd_soc_remove_pcm_runtime(struct snd_soc_card *card, { lockdep_assert_held(&client_mutex); - /* release machine specific resources */ - snd_soc_link_exit(rtd); - /* * Notify the machine driver for extra destruction */ @@ -1890,6 +1887,9 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card) snd_soc_dapm_shutdown(card); + /* release machine specific resources */ + for_each_card_rtds(card, rtd) + snd_soc_link_exit(rtd); /* remove and free each DAI */ soc_remove_link_dais(card); soc_remove_link_components(card);