]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-core: add soc_cleanup_component()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 21 Jan 2019 00:32:55 +0000 (09:32 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 21 Jan 2019 18:13:47 +0000 (18:13 +0000)
commitaf11717a09e064e33d17137b074f0b996bd0fad3
treeab500ddcb673e329fd776911f978e95de88d3c75
parentf724fea6889589c48e6d2b0bc46e431049c5979c
ASoC: soc-core: add soc_cleanup_component()

We need to cleanup component when soc_probe_component() was
failed, or when soc_remove_component() was called.
But they are cleanuping component on each way.
(And soc_probe_component() doesn't call snd_soc_dapm_free(),
but it should).
Same code in many places makes code un-understandable.

This patch adds new soc_cleanup_component() and call it from
snd_probe_component() and snd_remove_component().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c