From: Pierre-Louis Bossart Date: Thu, 8 Aug 2019 02:51:31 +0000 (-0500) Subject: ASoC: soc-core: fix module_put() warning in soc_cleanup_component X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0e36f36b04e7677c6b74349c9d4baea1ed5668f2;p=openwrt%2Fstaging%2Fblogic.git ASoC: soc-core: fix module_put() warning in soc_cleanup_component The recent changes introduce warnings in the SOF load/unload module tests. The code does not seem balanced with a confusion between _close() and _remove() macros. Using _remove() fixes the issue and removes the warning. Suggested-by: Ranjani Sridharan Fixes: 4a81e8f30d0b4 ('ASoC: soc-component: add snd_soc_component_get/put()') Signed-off-by: Pierre-Louis Bossart Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20190808025131.32482-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 1fbd525763d5..bf45e60eb34f 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -935,7 +935,7 @@ static void soc_cleanup_component(struct snd_soc_component *component) snd_soc_dapm_free(snd_soc_component_get_dapm(component)); soc_cleanup_component_debugfs(component); component->card = NULL; - snd_soc_component_module_put_when_close(component); + snd_soc_component_module_put_when_remove(component); } static void soc_remove_component(struct snd_soc_component *component)