summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-08-07 10:30:13 +0900
committerMark Brown <broonie@kernel.org>2019-08-07 14:25:28 +0100
commitad64bfbd09d7b7997a1b1510983350836bcd6ed9 (patch)
treebfb59e283a4b9452057b8798745e1e7ae5ef4438 /sound/soc/soc-core.c
parent371be51a925a619f1fb149b8d7707e353d9c9f86 (diff)
downloadlinux-ad64bfbd09d7b7997a1b1510983350836bcd6ed9.tar.bz2
ASoC: soc-core: set component->debugfs_root NULL
To be more safety code, let's set NULL to component->debugfs_root when it was cleanuped. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87muglahq0.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0f75dac4bb26..2f37c4e0974b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -171,7 +171,10 @@ static void soc_init_component_debugfs(struct snd_soc_component *component)
static void soc_cleanup_component_debugfs(struct snd_soc_component *component)
{
+ if (!component->debugfs_root)
+ return;
debugfs_remove_recursive(component->debugfs_root);
+ component->debugfs_root = NULL;
}
static int dai_list_show(struct seq_file *m, void *v)