diff options
author | Daniel Mack <daniel@zonque.org> | 2014-10-19 09:07:35 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-22 11:36:36 +0100 |
commit | 15f6b09a00a6d12b594c439fb3a7e2d113a05592 (patch) | |
tree | 9177e9aa51823aac6dd1b41bf0280e621ab334cf /sound | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
download | linux-15f6b09a00a6d12b594c439fb3a7e2d113a05592.tar.bz2 |
ASoC: soc-compress: consolidate two identical branches
The actions taken in both branches are identical, so we can simplify the
code. Spotted by Coverity.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-compress.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index cecfab3cc948..590a82f01d0b 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -258,10 +258,7 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream) list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE; - if (stream == SNDRV_PCM_STREAM_PLAYBACK) - dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); - else - dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); + dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; @@ -456,11 +453,7 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream, if (ret < 0) goto out; - if (stream == SNDRV_PCM_STREAM_PLAYBACK) - dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); - else - dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); - + dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; out: |