linux/sound/aoa
Zhao Dongdong 8df560fefe ALSA: aoa: check snd_ctl_new1() return value
snd_ctl_new1() can return NULL when memory allocation fails. In
layout.c, the function does not check the return value before
dereferencing ctl->id.name or passing to aoa_snd_ctl_add(), which can
lead to a NULL pointer dereference.

Add NULL checks after snd_ctl_new1() calls and return early if any
fails.

Assisted-by: Opencode:DeepSeek-V4-Flash
Cc: stable@vger.kernel.org
Fixes: f3d9478b2c ("[ALSA] snd-aoa: add snd-aoa")
Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn>
Link: https://patch.msgid.link/tencent_35F3A25FEEBF190A2E15ED787754C57E3708@qq.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-28 09:36:43 +02:00
..
codecs ALSA: aoa: onyx: Update IEC958 sample-rate status for PCM playback 2026-04-06 10:41:00 +02:00
core Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
fabrics ALSA: aoa: check snd_ctl_new1() return value 2026-05-28 09:36:43 +02:00
soundbus ALSA: aoa: i2sbus: clear stale prepared state 2026-04-01 09:58:37 +02:00
aoa-gpio.h ALSA: aoa: Replace asm/prom.h with explicit includes 2023-10-06 11:11:40 +02:00
aoa.h ALSA: aoa: Constify struct codec_connection 2026-02-28 09:33:15 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00