From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 2/6] ASoC: soc-pcm: remove redundant assignment
Date: Thu, 18 Feb 2021 16:19:17 -0600 [thread overview]
Message-ID: <20210218221921.88991-3-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20210218221921.88991-1-pierre-louis.bossart@linux.intel.com>
cppcheck warning:
sound/soc/soc-pcm.c:2398:7: style: Variable 'ret' is reassigned a
value before the old one has been used. [redundantAssignment]
ret = -EINVAL;
^
sound/soc/soc-pcm.c:2395:7: note: ret is assigned
ret = -EINVAL;
^
sound/soc/soc-pcm.c:2398:7: note: ret is overwritten
ret = -EINVAL;
^
This looks like a copy/paste or git merge issue.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
sound/soc/soc-pcm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 14d85ca1e435..12fd10a6c190 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2395,7 +2395,6 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream)
/* Only start the BE if the FE is ready */
if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_FREE ||
fe->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE) {
- ret = -EINVAL;
dev_err(fe->dev, "ASoC: FE %s is not ready %d\n",
fe->dai_link->name, fe->dpcm[stream].state);
ret = -EINVAL;
--
2.25.1
next prev parent reply other threads:[~2021-02-18 22:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 22:19 [PATCH 0/6] ASoC: core: remove cppcheck warnings Pierre-Louis Bossart
2021-02-18 22:19 ` [PATCH 1/6] ASoC: soc-ops: remove useless assignment Pierre-Louis Bossart
2021-02-18 22:19 ` Pierre-Louis Bossart [this message]
2021-02-18 22:19 ` [PATCH 3/6] ASoC: soc-pcm: remove shadowing variable Pierre-Louis Bossart
2021-02-18 22:19 ` [PATCH 4/6] ASoC: soc-pcm: add error log Pierre-Louis Bossart
2021-02-18 22:19 ` [PATCH 5/6] ASoC: soc-topology: clarify expression Pierre-Louis Bossart
2021-02-18 22:19 ` [PATCH 6/6] ASoC: generic: simple-card-utils: remove useless assignment Pierre-Louis Bossart
2021-03-01 23:34 ` [PATCH 0/6] ASoC: core: remove cppcheck warnings Mark Brown
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=20210218221921.88991-3-pierre-louis.bossart@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.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.