aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorCurtis Malainey <cujomalainey@chromium.org>2019-11-27 17:13:58 -0800
committerMark Brown <broonie@kernel.org>2019-12-09 10:55:42 +0000
commit9c9b65203492927cc4ae419e9601e837ecbd889e (patch)
tree7ca8a2263d94a0e034d6b94b8b01b270a6920c62 /sound/soc/soc-core.c
parentASoC: Intel: bytcr_rt5640: Update quirk for Teclast X89 (diff)
downloadlinux-dev-9c9b65203492927cc4ae419e9601e837ecbd889e.tar.xz
linux-dev-9c9b65203492927cc4ae419e9601e837ecbd889e.zip
ASoC: core: only flush inited work during free
There are many paths to soc_free_pcm_runtime which can both have and have not yet inited the workqueue yet. When we flush the queue when we have not yet inited the queue we cause warnings to be printed. An example is soc_cleanup_card_resources which is called by snd_soc_bind_card which has multiple failure points before and after soc_link_init -> soc_new_pcm which is where the queue is inited. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20191128011358.39234-1-cujomalainey@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0e2e628302f1..1c84ff1a5bf9 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -419,7 +419,8 @@ static void soc_free_pcm_runtime(struct snd_soc_pcm_runtime *rtd)
list_del(&rtd->list);
- flush_delayed_work(&rtd->delayed_work);
+ if (delayed_work_pending(&rtd->delayed_work))
+ flush_delayed_work(&rtd->delayed_work);
snd_soc_pcm_component_free(rtd);
/*