commit | c8dcdf829ca1827a802eae841dd04de8c9d6653f | [log] [tgz] |
---|---|---|
author | Takashi Iwai <tiwai@suse.de> | Fri Feb 06 16:21:20 2009 +0100 |
committer | Takashi Iwai <tiwai@suse.de> | Fri Feb 06 16:21:20 2009 +0100 |
tree | c5b5a334250d62ded8dcee13c6ac5091ac160384 | |
parent | d95ad4a9c04129f581fdffe01a379682e420ad9c [diff] [blame] |
ALSA: hda - Add missing NULL check in snd_hda_create_spdif_in_ctls() Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index c915879..93412f3 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c
@@ -1984,6 +1984,8 @@ } for (dig_mix = dig_in_ctls; dig_mix->name; dig_mix++) { kctl = snd_ctl_new1(dig_mix, codec); + if (!kctl) + return -ENOMEM; kctl->private_value = nid; err = snd_hda_ctl_add(codec, kctl); if (err < 0)