[syzbot] [sound?] BUG: unable to handle kernel NULL pointer dereference in snd_ctl_led_get

From: Jeffin Philip

Date: Thu Aug 27 2026 - 06:43:37 EST


#syz test: upstream 818bebeb63dd

diff --git a/sound/core/control_led.c b/sound/core/control_led.c
index 8cbacee57ce7..f6a46ed97d37 100644
--- a/sound/core/control_led.c
+++ b/sound/core/control_led.c
@@ -114,13 +114,11 @@ static int snd_ctl_led_get(struct snd_ctl_led_ctl *lctl)
info.id = kctl->id;
info.id.index += lctl->index_offset;
info.id.numid += lctl->index_offset;
- result = kctl->info(kctl, &info);
- if (result < 0)
+ if (!kctl->info || kctl->info(kctl, &info))
return -1;
memset(&value, 0, sizeof(value));
value.id = info.id;
- result = kctl->get(kctl, &value);
- if (result < 0)
+ if (!kctl->get || kctl->get(kctl, &value))
return -1;
if (info.type == SNDRV_CTL_ELEM_TYPE_BOOLEAN ||
info.type == SNDRV_CTL_ELEM_TYPE_INTEGER) {