summaryrefslogtreecommitdiff
path: root/sound/soc/sof/pcm.c
diff options
context:
space:
mode:
authortangmeng <tangmeng@uniontech.com>2022-03-30 23:19:26 +0300
committerMark Brown <broonie@kernel.org>2022-04-04 10:39:11 +0300
commit9e116f5a6e95e59145f90a82ad37ee0e53f686a9 (patch)
tree882acabae1bc7a2711dc670a7b2c22b9a4c099fa /sound/soc/sof/pcm.c
parent30b50b9734ddf08b0bb7321f47f4b849cba54875 (diff)
downloadlinux-9e116f5a6e95e59145f90a82ad37ee0e53f686a9.tar.xz
ASoC: SOF: Remove redundant return statements
After the free PCM action is executed, no matter what the return result is, it will return directly in sof_pcm_trigger. So the return statement here is redundant. Signed-off-by: tangmeng <tangmeng@uniontech.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220330201926.1330402-12-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/pcm.c')
-rw-r--r--sound/soc/sof/pcm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c
index 658cd8966c9a..b5cbc8b5c0ee 100644
--- a/sound/soc/sof/pcm.c
+++ b/sound/soc/sof/pcm.c
@@ -347,12 +347,9 @@ static int sof_pcm_trigger(struct snd_soc_component *component,
snd_sof_pcm_platform_trigger(sdev, substream, cmd);
/* free PCM if reset_hw_params is set and the STOP IPC is successful */
- if (!ret && reset_hw_params) {
+ if (!ret && reset_hw_params)
ret = sof_pcm_stream_free(sdev, substream, spcm, substream->stream,
free_widget_list);
- if (ret < 0)
- return ret;
- }
return ret;
}