From: Dan Carpenter <dan.carpenter@oracle.com>
To: tiwai@suse.de
Cc: alsa-devel@alsa-project.org
Subject: Re: ALSA: hda/realtek - Allow NULL bus->pci
Date: Wed, 8 Oct 2014 12:32:46 +0300 [thread overview]
Message-ID: <20141008093246.GA4690@mwanda> (raw)
Hello Takashi Iwai,
The patch 5100cd07d43a: "ALSA: hda/realtek - Allow NULL bus->pci"
from Feb 15, 2014, leads to the following static checker warning:
sound/pci/hda/patch_realtek.c:5371 patch_alc269()
warn: variable dereferenced before check 'codec->bus->pci' (see line 5364)
sound/pci/hda/patch_realtek.c
5363 if (has_cdefine_beep(codec))
^^^^^
We actually dereference "codec->bus->pci" inside the call to
has_cdefine_beep().
5364 spec->gen.beep_nid = 0x01;
5365
5366 switch (codec->vendor_id) {
5367 case 0x10ec0269:
5368 spec->codec_variant = ALC269_TYPE_ALC269VA;
5369 switch (alc_get_coef0(codec) & 0x00f0) {
5370 case 0x0010:
5371 if (codec->bus->pci &&
^^^^^^^^^^^^^^^
This new check is too late.
5372 codec->bus->pci->subsystem_vendor == 0x1025 &&
5373 spec->cdefine.platform_type == 1)
5374 err = alc_codec_rename(codec, "ALC271X");
5375 spec->codec_variant = ALC269_TYPE_ALC269VB;
5376 break;
There is another related warning:
sound/pci/hda/patch_realtek.c:6270 patch_alc662() warn: variable dereferenced before check 'codec->bus->pci' (see line 6267)
regards,
dan carpenter
next reply other threads:[~2014-10-08 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 9:32 Dan Carpenter [this message]
2014-10-08 10:12 ` ALSA: hda/realtek - Allow NULL bus->pci 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=20141008093246.GA4690@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox