diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-02-06 10:21:20 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-02-06 10:21:20 -0500 |
commit | c8dcdf829ca1827a802eae841dd04de8c9d6653f (patch) | |
tree | c5b5a334250d62ded8dcee13c6ac5091ac160384 /sound/pci/hda/hda_codec.c | |
parent | d95ad4a9c04129f581fdffe01a379682e420ad9c (diff) |
ALSA: hda - Add missing NULL check in snd_hda_create_spdif_in_ctls()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index c9158799ccb6..93412f335dc4 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1984,6 +1984,8 @@ int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid) | |||
1984 | } | 1984 | } |
1985 | for (dig_mix = dig_in_ctls; dig_mix->name; dig_mix++) { | 1985 | for (dig_mix = dig_in_ctls; dig_mix->name; dig_mix++) { |
1986 | kctl = snd_ctl_new1(dig_mix, codec); | 1986 | kctl = snd_ctl_new1(dig_mix, codec); |
1987 | if (!kctl) | ||
1988 | return -ENOMEM; | ||
1987 | kctl->private_value = nid; | 1989 | kctl->private_value = nid; |
1988 | err = snd_hda_ctl_add(codec, kctl); | 1990 | err = snd_hda_ctl_add(codec, kctl); |
1989 | if (err < 0) | 1991 | if (err < 0) |