From: Kuninori Morimoto Date: Wed, 7 Aug 2019 01:30:13 +0000 (+0900) Subject: ASoC: soc-core: set component->debugfs_root NULL X-Git-Tag: v5.4-rc1~52^2~1^2~225 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad64bfbd09d7b7997a1b1510983350836bcd6ed9;p=thirdparty%2Flinux.git 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 Link: https://lore.kernel.org/r/87muglahq0.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 0f75dac4bb264..2f37c4e0974b6 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)