From b4609e146476ba909e8b3ae0b1ca91204512b4bc Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 4 Nov 2008 08:43:08 +0100 Subject: [PATCH] --- yaml --- r: 120429 b: refs/heads/master c: b91f080f517cf9dd52023c11127a0ca33190e31a h: refs/heads/master i: 120427: 77f33a0350db4d25f44a83171570bdd1bd81fef8 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_codec.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 579bb4ed9b67..dc68465d4418 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4ef0ef1966dae9e9e29762e4e719af3cfd146ca0 +refs/heads/master: b91f080f517cf9dd52023c11127a0ca33190e31a diff --git a/trunk/sound/pci/hda/hda_codec.c b/trunk/sound/pci/hda/hda_codec.c index 8991db78fb67..aa9cd142c30a 100644 --- a/trunk/sound/pci/hda/hda_codec.c +++ b/trunk/sound/pci/hda/hda_codec.c @@ -1697,6 +1697,8 @@ int snd_hda_create_spdif_out_ctls(struct hda_codec *codec, hda_nid_t nid) } for (dig_mix = dig_mixes; dig_mix->name; dig_mix++) { kctl = snd_ctl_new1(dig_mix, codec); + if (!kctl) + return -ENOMEM; kctl->id.index = idx; kctl->private_value = nid; err = snd_hda_ctl_add(codec, kctl); @@ -2412,7 +2414,7 @@ snd_hda_attach_pcm(struct hda_codec *codec, struct hda_pcm *pcm) struct hda_pcm_stream *info; int stream, err; - if (!pcm->name) + if (snd_BUG_ON(!pcm->name)) return -EINVAL; for (stream = 0; stream < 2; stream++) { info = &pcm->stream[stream];