mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ALSA: hda - Fix oops caused by recent commit "Fix internal mic for Lenovo Ideapad U300s"
commit 83b0c6ba99
upstream.
Make sure we don't dereference the "quirk" pointer when it is null.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Weng Meiling <wengmeiling.weng@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
419f4dff0e
commit
d3ecba4704
1 changed files with 3 additions and 1 deletions
|
@ -4430,7 +4430,9 @@ static void apply_fixup(struct hda_codec *codec,
|
|||
struct conexant_spec *spec = codec->spec;
|
||||
|
||||
quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk);
|
||||
if (quirk && table[quirk->value]) {
|
||||
if (!quirk)
|
||||
return;
|
||||
if (table[quirk->value]) {
|
||||
snd_printdd(KERN_INFO "hda_codec: applying pincfg for %s\n",
|
||||
quirk->name);
|
||||
apply_pincfg(codec, table[quirk->value]);
|
||||
|
|
Loading…
Reference in a new issue