summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
diff options
context:
space:
mode:
authorNĂ­colas F. R. A. Prado <nfraprado@collabora.com>2024-01-08 23:44:58 +0300
committerMark Brown <broonie@kernel.org>2024-01-08 23:58:28 +0300
commit4d4e1b6319e5c4425ea3faeaf9a10b8b4c16c1e1 (patch)
tree22079a8b051bfbf1d24028b87c8210b0cb14a9e4 /sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
parent3ec71290db4de298b67659ef2bc2a8f84cf9537b (diff)
downloadlinux-4d4e1b6319e5c4425ea3faeaf9a10b8b4c16c1e1.tar.xz
ASoC: mediatek: mt8192: Check existence of dai_name before dereferencing
Following commit 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()"), the dai_name field is only populated for dummy components after the card is registered. This causes a null pointer dereference in the mt8192-mt6359 sound card driver's probe function when searching for a dai_name among all the card's dai links. Verify that the dai_name is non-null before passing it to strcmp. While at it, also check that there's at least one codec. Reported-by: kernelci.org bot <bot@kernelci.org> Closes: https://linux.kernelci.org/test/case/id/6582cd6d992645c680e13478/ Fixes: 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()") Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com> Link: https://msgid.link/r/20240108204508.691739-1-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek/mt8195/mt8195-afe-pcm.c')
0 files changed, 0 insertions, 0 deletions