dect
/
linux-2.6
Archived
13
0
Fork 0

ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44721

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2012-10-11 16:43:40 +02:00
parent ddffeb8c4d
commit 733a48e5ae
1 changed files with 2 additions and 0 deletions

View File

@ -1271,6 +1271,8 @@ static int snd_ac97_cvol_new(struct snd_card *card, char *name, int reg, unsigne
tmp.index = ac97->num;
kctl = snd_ctl_new1(&tmp, ac97);
}
if (!kctl)
return -ENOMEM;
if (reg >= AC97_PHONE && reg <= AC97_PCM)
set_tlv_db_scale(kctl, db_scale_5bit_12db_max);
else