]> www.infradead.org Git - users/dwmw2/linux.git/commit
ASoC: soc-core.c: Skip dummy codec when adding platforms
authorChancel Liu <chancel.liu@nxp.com>
Tue, 5 Mar 2024 06:56:06 +0000 (15:56 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Apr 2024 11:01:46 +0000 (13:01 +0200)
commit3beea96d4fc8ad39743856941e5f726a13957e3b
treeb8209ed0d32e8ebf05a30e5db9a9724c3e6ab2f8
parenteb7e92dbdc7834d97063954eb645a55700eb3da5
ASoC: soc-core.c: Skip dummy codec when adding platforms

[ Upstream commit 23fb6bc2696119391ec3a92ccaffe50e567c515e ]

When pcm_runtime is adding platform components it will scan all
registered components. In case of DPCM FE/BE some DAI links will
configure dummy platform. However both dummy codec and dummy platform
are using "snd-soc-dummy" as component->name. Dummy codec should be
skipped when adding platforms otherwise there'll be overflow and UBSAN
complains.

Reported-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://msgid.link/r/20240305065606.3778642-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/soc-core.c