projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b08d7db
)
ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()
author
Takashi Iwai
<tiwai@suse.de>
Thu, 11 Oct 2012 14:43:40 +0000
(16:43 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sun, 21 Oct 2012 16:17:12 +0000
(09:17 -0700)
commit
733a48e5ae5bf28b046fad984d458c747cbb8c21
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>
sound/pci/ac97/ac97_codec.c
patch
|
blob
|
history
diff --git
a/sound/pci/ac97/ac97_codec.c
b/sound/pci/ac97/ac97_codec.c
index 7f4d619f4ddb06f8be256f256879ebe590ba1088..11ccc23ba1536727178f9dde0722bf06de72b10e 100644
(file)
--- a/
sound/pci/ac97/ac97_codec.c
+++ b/
sound/pci/ac97/ac97_codec.c
@@
-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