linux/sound/soc/mediatek/mt8192
Nícolas F. R. A. Prado 4d4e1b6319
ASoC: mediatek: mt8192: Check existence of dai_name before dereferencing
Following commit 13f58267cd ("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: 13f58267cd ("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>
2024-01-08 20:58:28 +00:00
..
Makefile ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682 2020-11-04 17:51:52 +00:00
mt8192-afe-clk.c ASoC: mt8192: Remove function name log messages 2023-03-14 13:30:20 +00:00
mt8192-afe-clk.h
mt8192-afe-common.h ASoC: mediatek: mt8192: Allow setting shared clocks from machine driver 2022-09-09 18:48:52 +01:00
mt8192-afe-control.c ASoC: do not include pm_runtime.h if not used 2023-05-23 13:55:55 +01:00
mt8192-afe-gpio.c ASoC: mt8192-afe-gpio: Drop unused include 2023-10-09 14:27:50 +01:00
mt8192-afe-gpio.h
mt8192-afe-pcm.c ASoC: mediatek: convert not to use asoc_xxx() 2023-09-26 17:18:38 +02:00
mt8192-dai-adda.c ASoC: mediatek: mt8192: Handle component name prefix 2023-10-26 12:15:52 +01:00
mt8192-dai-i2s.c ASoC: mediatek: mt8192: Handle component name prefix 2023-10-26 12:15:52 +01:00
mt8192-dai-pcm.c ASoC: mediatek: use helper function 2023-01-31 11:05:02 +00:00
mt8192-dai-tdm.c ASoC: mt8192: Move spammy messages to debug level 2023-03-14 13:30:20 +00:00
mt8192-interconnection.h
mt8192-mt6359-rt1015-rt5682.c ASoC: mediatek: mt8192: Check existence of dai_name before dereferencing 2024-01-08 20:58:28 +00:00
mt8192-reg.h ASoC: mediatek: mt8192: fix tdm out data is valid on rising edge 2021-03-12 14:25:32 +00:00