ALSA: check snd_ctl_new1() return value in multiple drivers
v2 cover ALSA: check snd_ctl_new1() return value in multiple drivers
From: Zhao Dongdong <[email protected]>
Check snd_ctl_new1() return value before dereferencing in:
- es1938
- cmipci
- ymfpci
- ice1712 (aureon, ice1712, ice1724)
- gus
- aoa (layout)
snd_ctl_new1() can return NULL when memory allocation fails. Add a NULL check and return -ENOMEM on failure.
Assisted-by Opencode:DeepSeek-V4-Flash
Signed-off-by Zhao Dongdong <[email protected]>
---
v1: https://lore.kernel.org/linux-sound/[email protected]/
---
Zhao Dongdong (6):
ALSA: es1938: check snd_ctl_new1() return value
ALSA: gus: check snd_ctl_new1() return value
ALSA: ice1712: check snd_ctl_new1() return value
ALSA: ymfpci: check snd_ctl_new1() return value
ALSA: cmipci: check snd_ctl_new1() return value
ALSA: aoa: check snd_ctl_new1() return value
sound/aoa/fabrics/layout.c | 6 ++++++ sound/isa/gus/gus_pcm.c | 2 ++ sound/pci/cmipci.c | 6 ++++++ sound/pci/es1938.c | 2 ++ sound/pci/ice1712/aureon.c | 2 ++ sound/pci/ice1712/ice1712.c | 8 ++++++++ sound/pci/ice1712/ice1724.c | 6 ++++++ sound/pci/ymfpci/ymfpci_main.c | 6 ++++++ 8 files changed, 38 insertions(+)
Signature · 1 line
2.25.1