]> asedeno.scripts.mit.edu Git - linux.git/commit
ASoC: soc-core: fixup references at soc_cleanup_card_resources()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 27 May 2019 07:51:34 +0000 (16:51 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 28 May 2019 14:45:53 +0000 (15:45 +0100)
commit29040d1ac569606fece70966179de272cfc0d4db
tree01c7312960cc0df774eb87f5251f469c3e60d7c0
parent34ac3c3eb8f0c07252ceddf0a22dd240e5c91ccb
ASoC: soc-core: fixup references at soc_cleanup_card_resources()

commit 53e947a0e1f7 ("ASoC: soc-core: merge card resources cleanup
method") merged cleanup method of snd_soc_instantiate_card() and
soc_cleanup_card_resources().

But, after this commit, if user uses unbind/bind to Component factor
drivers, Kernel might indicates refcount error at
soc_cleanup_card_resources().

The 1st reason is card->snd_card is still exist even though
snd_card_free() was called, but it is already cleaned.
We need to set NULL to it.

2nd is card->dapm and card create debugfs, but its dentry is still
exist even though it was removed. We need to set NULL to it.

Fixes: 53e947a0e1f7 ("ASoC: soc-core: merge card resources cleanup method")
Cc: stable@vger.kernel.org # for v5.1
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c
sound/soc/soc-dapm.c