summaryrefslogtreecommitdiff
path: root/sound/soc/soc-component.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-01-10 11:51:21 +0000
committerMark Brown <broonie@kernel.org>2020-01-10 11:51:21 +0000
commit23534b197159dd07d3e02d4afd7fca3243d30bce (patch)
treef8d30b457150a3e646ac809e263f037f0eb92fc4 /sound/soc/soc-component.c
parent320b8b0d13b81f3697acff5b6ddb47f88a09c118 (diff)
parenta14bf98c045bf119b7e779f186528e38c6428830 (diff)
Merge branch 'for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.6
Diffstat (limited to 'sound/soc/soc-component.c')
-rw-r--r--sound/soc/soc-component.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 9054558ce386..b94680fb26fa 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -539,6 +539,9 @@ void snd_soc_pcm_component_free(struct snd_soc_pcm_runtime *rtd)
struct snd_soc_rtdcom_list *rtdcom;
struct snd_soc_component *component;
+ if (!rtd->pcm)
+ return;
+
for_each_rtd_components(rtd, rtdcom, component)
if (component->driver->pcm_destruct)
component->driver->pcm_destruct(component, rtd->pcm);