From: Vinod Koul <vinod.koul@intel.com>
To: "Kp, Jeeja" <jeeja.kp@intel.com>, dan.carpenter@oracle.com
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: Intel: Add Skylake HDA platform driver
Date: Fri, 30 Oct 2015 17:40:55 +0530 [thread overview]
Message-ID: <20151030121055.GD21326@localhost> (raw)
In-Reply-To: <FE1218A4CE6FF04999892577E0FB3E832B42BFB8@BGSMSX102.gar.corp.intel.com>
> > 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.
Right, will move ebus init here.
Thanks for reporting this
> >
> > 803 delay = skl_get_delay_from_lpib(ebus, hstream, pos)
> > 804 + codec_delay;
> >
> > regards,
> > dan carpenter
--
~Vinod
prev parent reply other threads:[~2015-10-30 12:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 20:53 ASoC: Intel: Add Skylake HDA platform driver Dan Carpenter
[not found] ` <FE1218A4CE6FF04999892577E0FB3E832B42BFB8@BGSMSX102.gar.corp.intel.com>
2015-10-30 12:10 ` Vinod Koul [this message]
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=20151030121055.GD21326@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=dan.carpenter@oracle.com \
--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.