linux/sound/soc/amd
Li Qiang 095d692e59 ASoC: amd/sdw_utils: avoid NULL deref when devm_kasprintf() fails
[ Upstream commit 5726b68473 ]

devm_kasprintf() may return NULL on memory allocation failure,
but the debug message prints cpus->dai_name before checking it.
Move the dev_dbg() call after the NULL check to prevent potential
NULL pointer dereference.

Fixes: cb8ea62e64 ("ASoC: amd/sdw_utils: add sof based soundwire generic machine driver")
Signed-off-by: Li Qiang <liqiang01@kylinos.cn>
Link: https://patch.msgid.link/20251015075530.146851-1-liqiang01@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-10-23 16:20:37 +02:00
..
acp ASoC: amd/sdw_utils: avoid NULL deref when devm_kasprintf() fails 2025-10-23 16:20:37 +02:00
include ASoC: AMD : add ACP 2.2 register headers 2016-01-10 12:44:10 +00:00
ps ASoC: amd: ps: use macro for ACP6.3 pci revision id 2025-04-20 10:15:14 +02:00
raven ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
renoir ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
rpl ASoC: amd: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:13 +09:00
vangogh ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
yc ASoC: amd: yc: add DMI quirk for ASUS M6501RM 2025-08-15 12:13:31 +02:00
acp-config.c ASoC: amd: Add acpi machine id for acp7.0 version based platform 2024-08-23 11:03:05 +01:00
acp-da7219-max98357a.c ASoC: amd: acp-da7219-max98357a: Constify regulator_ops 2024-04-15 10:17:20 +09:00
acp-es8336.c ASoC: amd: Adjust error handling in case of absent codec device 2024-07-04 12:42:25 +01:00
acp-pcm-dma.c ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
acp-rt5645.c ASoC: amd: convert not to use asoc_xxx() 2023-09-25 14:16:17 +02:00
acp.h ASoC: amd: add I2S MICSP instance support 2022-07-05 13:00:44 +01:00
acp3x-rt5682-max9836.c ASoC: amd: Use snd_soc_substream_to_rtd() for accessing private_data 2024-05-06 23:59:50 +09:00
Kconfig ASoC: amd: Add ACPI dependency to fix build error 2025-02-17 10:04:55 +01:00
mach-config.h ASoC: amd: Add acpi machine id for acp7.0 version based platform 2024-08-23 11:03:05 +01:00
Makefile ASoC: amd: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:13 +09:00