ALSA: check snd_ctl_new1() return value in multiple drivers
v3 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.
---
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
Takashi Iwai
AppliedQuoted 19 lines · Zhao Dongdong
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-ENOMEMon failure.Assisted-by Opencode:DeepSeek-V4-FlashSigned-off-by Zhao Dongdong <[email protected]>---
v1: https://lore.kernel.org/linux-sound/[email protected]/
Quoted 8 lines
---
Zhao Dongdong (6):
ALSA: es1938: checksnd_ctl_new1()return value
ALSA: gus: checksnd_ctl_new1()return value
ALSA: ice1712: checksnd_ctl_new1()return value
ALSA: ymfpci: checksnd_ctl_new1()return value
ALSA: cmipci: checksnd_ctl_new1()return value
ALSA: aoa: checksnd_ctl_new1()return value
Applied all 6 patches to for-next branch now. Thanks.
Takashi