From: tangmeng Date: Wed, 30 Mar 2022 20:19:26 +0000 (-0700) Subject: ASoC: SOF: Remove redundant return statements X-Git-Tag: v6.6.17~6759^2~68^2~170^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e116f5a6e95e59145f90a82ad37ee0e53f686a9;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Péter Ujfalusi Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220330201926.1330402-12-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index 658cd89..b5cbc8b 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; }