mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()
commit 733a48e5ae
upstream.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44721
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
60dd77abe1
commit
e503f73ae9
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue