From: Dan Carpenter <dan.carpenter@oracle.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, kbuild@01.org
Subject: sound/pci/hda/patch_analog.c:4987 patch_ad1882() error: potentially derefencing uninitialized 'spec'.
Date: Tue, 22 Jan 2013 22:10:10 +0300 [thread overview]
Message-ID: <20130122191010.GE16282@mwanda> (raw)
Hi Takashi,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-unstable.git master
head: 96349b211586f3a6f2750bc4ea195bd9739465b6
commit: e87b24f711c797f1277188dc85b866bec17704a0 ALSA: hda - Rearrange for dropping static quirk codes in AD codec driver
New smatch warnings:
sound/pci/hda/patch_analog.c:4987 patch_ad1882() error: potentially derefencing uninitialized 'spec'.
git remote add sound-unstable git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-unstable.git
git remote update sound-unstable
git checkout e87b24f711c797f1277188dc85b866bec17704a0
vim +/spec +4987 sound/pci/hda/patch_analog.c
e87b24f7 Takashi Iwai 2013-01-22 4971 #ifdef ENABLE_AD_STATIC_QUIRKS
0ac8551e Takashi Iwai 2007-06-20 4972 static int patch_ad1882(struct hda_codec *codec)
0ac8551e Takashi Iwai 2007-06-20 4973 {
0ac8551e Takashi Iwai 2007-06-20 4974 struct ad198x_spec *spec;
c5a4bcd0 Takashi Iwai 2009-02-06 4975 int err, board_config;
0ac8551e Takashi Iwai 2007-06-20 4976
78bb3cb0 Takashi Iwai 2012-12-21 4977 board_config = snd_hda_check_board_config(codec, AD1882_MODELS,
78bb3cb0 Takashi Iwai 2012-12-21 4978 ad1882_models, NULL);
e87b24f7 Takashi Iwai 2013-01-22 4979 if (board_config == AD1882_AUTO)
e87b24f7 Takashi Iwai 2013-01-22 4980 return ad1882_parse_auto_config(codec);
78bb3cb0 Takashi Iwai 2012-12-21 4981
c5a4bcd0 Takashi Iwai 2009-02-06 4982 err = snd_hda_attach_beep_device(codec, 0x10);
c5a4bcd0 Takashi Iwai 2009-02-06 4983 if (err < 0) {
c5a4bcd0 Takashi Iwai 2009-02-06 4984 ad198x_free(codec);
c5a4bcd0 Takashi Iwai 2009-02-06 4985 return err;
c5a4bcd0 Takashi Iwai 2009-02-06 4986 }
c5a4bcd0 Takashi Iwai 2009-02-06 @4987 set_beep_amp(spec, 0x10, 0, HDA_OUTPUT);
c5a4bcd0 Takashi Iwai 2009-02-06 4988
0ac8551e Takashi Iwai 2007-06-20 4989 spec->multiout.max_channels = 6;
0ac8551e Takashi Iwai 2007-06-20 4990 spec->multiout.num_dacs = 3;
0ac8551e Takashi Iwai 2007-06-20 4991 spec->multiout.dac_nids = ad1882_dac_nids;
0ac8551e Takashi Iwai 2007-06-20 4992 spec->multiout.dig_out_nid = AD1882_SPDIF_OUT;
0ac8551e Takashi Iwai 2007-06-20 4993 spec->num_adc_nids = ARRAY_SIZE(ad1882_adc_nids);
0ac8551e Takashi Iwai 2007-06-20 4994 spec->adc_nids = ad1882_adc_nids;
0ac8551e Takashi Iwai 2007-06-20 4995 spec->capsrc_nids = ad1882_capsrc_nids;
---
0-DAY kernel build testing backend Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
next reply other threads:[~2013-01-22 19:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 19:10 Dan Carpenter [this message]
2013-01-22 20:25 ` sound/pci/hda/patch_analog.c:4987 patch_ad1882() error: potentially derefencing uninitialized 'spec' Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130122191010.GE16282@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=kbuild@01.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.