[alsa-devel] [PATCH 02/28] ASoC: soc-core: set component->debugfs_root NULL
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Tue Aug 6 16:49:20 CEST 2019
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 40bac40..00887f7 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;
that test is redundant, it's safe to call debugfs_remove_recursive()
without checking the argument (done internally).
> debugfs_remove_recursive(component->debugfs_root);
> + component->debugfs_root = NULL;
> }
More information about the Alsa-devel
mailing list