X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=sound%2Fpci%2Fac97%2Fac97_codec.c;h=1e7cfba61c49f2f2a8d2cf45ebea1db28b572453;hp=7f4d619f4ddb06f8be256f256879ebe590ba1088;hb=19bed0e32102a9bc2e73a881debe956ce1a9e124;hpb=b7b57551bbda1390959207f79f2038aa7adb72ae diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 7f4d619f4ddb..1e7cfba61c49 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -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