ASoC: Fix module refcount for auxiliary devices
PATCH 1/1 ASoC: Fix module refcount for auxiliary devices
Commit f6c2ed5 "ASoC: Fix the device references to codec and platform drivers" moved codec driver refcount increments from soc_bind_dai_link into soc_probe_codec.
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.
--- sound/soc/soc-core.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
sound/soc/soc-core.c +0 -3
@@ -1664,9 +1664,6 @@ static int soc_probe_aux_dev(struct snd_soc_card *card, int num) goto out; found: -if (!try_module_get (codec->dev->driver->owner)) -return -ENODEV ; - ret =soc_probe_codec (card, codec);if (ret <0 )return ret;
Signature · 1 line
1.7.2.3
Quoted 4 lines · Jarkko Nikula
Commit f6c2ed5 "ASoC: Fix the device references to codec and platform drivers" moved codec driver refcount increments from
soc_bind_dai_linkintosoc_probe_codec.
Quoted 8 lines
However, the commit didn't remove
try_module_getfromsoc_probe_aux_devso the auxiliary device reference counts are incremented twice as thesoc_probe_codecis called fromsoc_probe_aux_devtoo.Signed-off-by Jarkko Nikula <[email protected]>Cc Vinod Koul <[email protected]>Cc Harsha Priya <[email protected]>---
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Mark Brown
AppliedQuoted 3 lines · Jarkko Nikula
However, the commit didn't remove
try_module_getfromsoc_probe_aux_devso the auxiliary device reference counts are incremented twice as thesoc_probe_codecis called fromsoc_probe_aux_devtoo.
Applied, thanks.