[alsa-devel] [PATCH 1/2] ASoC: Fix module refcount for auxiliary devices

Jarkko Nikula jhnikula at gmail.com
Thu Jan 27 15:24:21 CET 2011

Commit f6c2ed5 "ASoC: Fix the device references to codec and platform drivers"
moved codec driver refcount increments from soc_bind_dai_link into

However, the commit didn't remove try_module_get from soc_probe_aux_dev so
the auxiliary device reference counts are incremented twice as the
soc_probe_codec is called from soc_probe_aux_dev too.

Signed-off-by: Jarkko Nikula <jhnikula at gmail.com>
Cc: Vinod Koul <vinod.koul at intel.com>
Cc: Harsha Priya <priya.harsha at intel.com>
 sound/soc/soc-core.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 8af47f7..e9f81c5 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1670,9 +1670,6 @@ static int soc_probe_aux_dev(struct snd_soc_card *card, int num)
 	goto out;
-	if (!try_module_get(codec->dev->driver->owner))
-		return -ENODEV;
 	ret = soc_probe_codec(card, codec);
 	if (ret < 0)
 		return ret;

More information about the Alsa-devel mailing list