mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
ASoC: topology: Do not call snd_soc_remove_pcm_runtime() for ignored links
If a link has been ignored then it is not even added. The snd_soc_get_pcm_runtime() will return NULL as the runtime will does not exist. We can just skip this step to avoid performing a lookup to do nothing. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://patch.msgid.link/20250619084222.559-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
d9f38d9824
commit
cbf4e0fac3
@@ -429,8 +429,11 @@ static void soc_tplg_remove_link(struct snd_soc_component *comp,
|
||||
dobj->unload(comp, dobj);
|
||||
|
||||
list_del(&dobj->list);
|
||||
snd_soc_remove_pcm_runtime(comp->card,
|
||||
snd_soc_get_pcm_runtime(comp->card, link));
|
||||
|
||||
/* Ignored links do not need to be removed, they are not added */
|
||||
if (!link->ignore)
|
||||
snd_soc_remove_pcm_runtime(comp->card,
|
||||
snd_soc_get_pcm_runtime(comp->card, link));
|
||||
}
|
||||
|
||||
/* unload dai link */
|
||||
|
||||
Reference in New Issue
Block a user