linux/sound/soc/amd
Li Qiang a1cccbd196 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:24:37 +02:00
..
acp ASoC: amd/sdw_utils: avoid NULL deref when devm_kasprintf() fails 2025-10-23 16:24:37 +02:00
include ASoC: AMD : add ACP 2.2 register headers 2016-01-10 12:44:10 +00:00
ps ASoC: amd: ps: Add SoundWire pci and dma driver support for acp7.2 platform 2025-08-01 14:36:05 +01: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: Convert to RUNTIME_PM_OPS() & co 2025-03-17 10:15:04 +00:00
vangogh ASoC: amd: Convert to RUNTIME_PM_OPS() & co 2025-03-17 10:15:04 +00:00
yc ASoC: amd: yc: Add DMI quirk for HP Laptop 17 cp-2033dx 2025-07-16 11:50:33 +01: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: use new ACP dev names for DAI links 2025-05-14 15:15:59 +02:00
acp-es8336.c ASoC: amd: use new ACP dev names for DAI links 2025-05-14 15:15:59 +02: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: use new ACP dev names for DAI links 2025-05-14 15:15:59 +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: remove dpcm_xxx flags 2024-10-23 13:01:54 +01:00
Kconfig ASoC: amd: Standardize ASoC menu 2025-06-24 01:01:10 +01:00
mach-config.h ASoC: amd: acp: add soundwire machine for ACP7.0 and ACP7.1 sof stack 2025-06-23 13:12:14 +01:00
Makefile ASoC: amd: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:13 +09:00