]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-core: use device_unregister() if rtd allocation failed
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 30 Mar 2021 05:26:38 +0000 (14:26 +0900)
committerMark Brown <broonie@kernel.org>
Wed, 31 Mar 2021 17:02:23 +0000 (18:02 +0100)
commitc3508acb844d714293b2b4275d21bfaae067bf78
tree4e01d1028fe12407b39c3adf6b8fb9bdd73b8dc8
parente36c1a06d4d64cf29468352bc82495373b66168f
ASoC: soc-core: use device_unregister() if rtd allocation failed

Because soc_free_pcm_runtime(rtd) checks rtd pointer and freeing
rtd->xxx, it doesn't work correctly in case of rtd allocation failed.

We need to use device_unregister(dev) in such case.
This patch fixup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1jxxldd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c