diff options
author | Mark Brown <broonie@kernel.org> | 2021-03-02 00:31:51 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-10 14:08:32 +0100 |
commit | d59748076b89bd895d313008912db6a02b7ed33a (patch) | |
tree | 157357beba0fcb5229fdd59ba1f944274f01444b /sound/soc/soc-pcm.c | |
parent | Merge series "ASoC: samsung: remove cppcheck warnings" from Pierre-Louis Boss... (diff) | |
parent | ASoC: generic: simple-card-utils: remove useless assignment (diff) | |
download | linux-d59748076b89bd895d313008912db6a02b7ed33a.tar.xz linux-d59748076b89bd895d313008912db6a02b7ed33a.zip |
Merge series "ASoC: core: remove cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
This is the first batch of cleanups to make cppcheck more usable,
currently we have way too many warnings that drown real issues.
Pierre-Louis Bossart (6):
ASoC: soc-ops: remove useless assignment
ASoC: soc-pcm: remove redundant assignment
ASoC: soc-pcm: remove shadowing variable
ASoC: soc-pcm: add error log
ASoC: soc-topology: clarify expression
ASoC: generic: simple-card-utils: remove useless assignment
sound/soc/generic/simple-card-utils.c | 2 +-
sound/soc/soc-ops.c | 2 +-
sound/soc/soc-pcm.c | 4 ++--
sound/soc/soc-topology.c | 16 ++++++++--------
4 files changed, 12 insertions(+), 12 deletions(-)
--
2.25.1
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 511c9218308a..ba8ffbf8a5d3 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1707,7 +1707,6 @@ static int dpcm_apply_symmetry(struct snd_pcm_substream *fe_substream, snd_soc_dpcm_get_substream(be, stream); struct snd_soc_pcm_runtime *rtd; struct snd_soc_dai *dai; - int i; /* A backend may not have the requested substream */ if (!be_substream) @@ -1901,6 +1900,8 @@ static int dpcm_fe_dai_hw_free(struct snd_pcm_substream *substream) /* only hw_params backends that are either sinks or sources * to this frontend DAI */ err = dpcm_be_dai_hw_free(fe, stream); + if (err < 0) + dev_err(fe->dev, "ASoC: hw_free BE failed %d\n", err); fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); @@ -2388,7 +2389,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; |