Commit c8dcdf82 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Add missing NULL check in snd_hda_create_spdif_in_ctls()

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d95ad4a9
...@@ -1984,6 +1984,8 @@ int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid) ...@@ -1984,6 +1984,8 @@ int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid)
} }
for (dig_mix = dig_in_ctls; dig_mix->name; dig_mix++) { for (dig_mix = dig_in_ctls; dig_mix->name; dig_mix++) {
kctl = snd_ctl_new1(dig_mix, codec); kctl = snd_ctl_new1(dig_mix, codec);
if (!kctl)
return -ENOMEM;
kctl->private_value = nid; kctl->private_value = nid;
err = snd_hda_ctl_add(codec, kctl); err = snd_hda_ctl_add(codec, kctl);
if (err < 0) if (err < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment