From: Dan Carpenter <dan.carpenter@oracle.com>
To: jeeja.kp@intel.com
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: Intel: Add Skylake HDA platform driver
Date: Wed, 21 Oct 2015 23:53:14 +0300 [thread overview]
Message-ID: <20151021205314.GA9839@mwanda> (raw)
Hello Jeeja KP,
This is a semi-automatic email about new static checker warnings.
The patch a40e693c7f5e: "ASoC: Intel: Add Skylake HDA platform
driver" from Jul 9, 2015, leads to the following Smatch complaint:
sound/soc/intel/skylake/skl-pcm.c:802 skl_get_position()
warn: variable dereferenced before check 'substream->runtime' (see line 792)
sound/soc/intel/skylake/skl-pcm.c
791 struct snd_pcm_substream *substream = hstr->substream;
792 struct hdac_ext_bus *ebus = get_bus_ctx(substream);
^^^^^^^^^^^^^^^^^^^^^^
Dereference inside function.
793 unsigned int pos;
794 int delay;
795
796 /* use the position buffer as default */
797 pos = snd_hdac_stream_get_pos_posbuf(hdac_stream(hstream));
798
799 if (pos >= hdac_stream(hstream)->bufsize)
800 pos = 0;
801
802 if (substream->runtime) {
^^^^^^^^^^^^^^^^^^
Checked too late.
803 delay = skl_get_delay_from_lpib(ebus, hstream, pos)
804 + codec_delay;
regards,
dan carpenter
next reply other threads:[~2015-10-21 20:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 20:53 Dan Carpenter [this message]
[not found] ` <FE1218A4CE6FF04999892577E0FB3E832B42BFB8@BGSMSX102.gar.corp.intel.com>
2015-10-30 12:10 ` ASoC: Intel: Add Skylake HDA platform driver Vinod Koul
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=20151021205314.GA9839@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=jeeja.kp@intel.com \
/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.