From: <dan.carpenter@oracle.com>
To: srinivas.kandagatla@linaro.org
Cc: alsa-devel@alsa-project.org
Subject: [bug report] ASoC: soc-dai: return proper error for get_sdw_stream()
Date: Fri, 17 Jul 2020 12:40:53 +0300 [thread overview]
Message-ID: <20200717094053.GA23150@mwanda> (raw)
Hello Srinivas Kandagatla,
The patch 308811a327c3: "ASoC: soc-dai: return proper error for
get_sdw_stream()" from Mar 16, 2020, leads to the following static
checker warning:
drivers/soundwire/stream.c:1920 sdw_shutdown_stream()
error: 'sdw_stream' dereferencing possible ERR_PTR()
drivers/soundwire/stream.c
1902 void sdw_shutdown_stream(void *sdw_substream)
1903 {
1904 struct snd_pcm_substream *substream = sdw_substream;
1905 struct snd_soc_pcm_runtime *rtd = substream->private_data;
1906 struct sdw_stream_runtime *sdw_stream;
1907 struct snd_soc_dai *dai;
1908
1909 /* Find stream from first CPU DAI */
1910 dai = asoc_rtd_to_cpu(rtd, 0);
1911
1912 sdw_stream = snd_soc_dai_get_sdw_stream(dai, substream->stream);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We updated this to return error pointers as well as NULL but forgot to
check the caller.
1913
1914 if (!sdw_stream) {
1915 dev_err(rtd->dev, "no stream found for DAI %s", dai->name);
1916 return;
1917 }
1918
1919 /* release memory */
1920 kfree(sdw_stream->name);
1921 sdw_release_stream(sdw_stream);
1922
regards,
dan carpenter
reply other threads:[~2020-07-17 9:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200717094053.GA23150@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=srinivas.kandagatla@linaro.org \
/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.