[alsa-devel] [PATCH] Fix oops caused by recent commit "Fix internal mic for Lenovo Ideapad U300s"
Takashi Iwai
tiwai at suse.de
Tue Apr 10 14:56:33 CEST 2012
At Tue, 10 Apr 2012 13:05:29 +0200,
David Henningsson wrote:
>
> Make sure we don't dereference the "quirk" pointer when it is null.
>
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
> Signed-off-by: David Henningsson <david.henningsson at canonical.com>
Applied now. Thanks.
Takashi
> ---
> sound/pci/hda/patch_conexant.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
> index cbe115b..abb59f4 100644
> --- a/sound/pci/hda/patch_conexant.c
> +++ b/sound/pci/hda/patch_conexant.c
> @@ -4441,7 +4441,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]);
> --
> 1.7.9.1
>
More information about the Alsa-devel
mailing list