ASoC: sdm845: remove unnecessary goto
Subsystems (3)
PATCH 1/1 ASoC: sdm845: remove unnecessary goto
There is no specific handling in the error path of sdm845_tdm_snd_hw_params, remove the unnecessary goto and label. As there is no specific handling in error path return with error code directly.
Signed-off-by Chetan Kankotiya <[email protected]>
--- sound/soc/qcom/sdm845.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
sound/soc/qcom/sdm845.c +5 -6
@@ -61,7 +61,7 @@ static int sdm845_tdm_snd_hw_params(struct snd_pcm_substream *substream,if (ret <0 ) {dev_err (rtd->dev,"%s: failed to set tdm slot, err:%d\n" , __func__, ret); - goto end; +return ret; } ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL,
@@ -69,7 +69,7 @@ static int sdm845_tdm_snd_hw_params(struct snd_pcm_substream *substream,if (ret <0 ) {dev_err (rtd->dev,"%s: failed to set channel map, err:%d\n" , __func__, ret); - goto end; +return ret; } }else { ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0xf, 0,
@@ -77,7 +77,7 @@ static int sdm845_tdm_snd_hw_params(struct snd_pcm_substream *substream,if (ret <0 ) {dev_err (rtd->dev,"%s: failed to set tdm slot, err:%d\n" , __func__, ret); - goto end; +return ret; } ret = snd_soc_dai_set_channel_map(cpu_dai, channels,
@@ -85,7 +85,7 @@ static int sdm845_tdm_snd_hw_params(struct snd_pcm_substream *substream,if (ret <0 ) {dev_err (rtd->dev,"%s: failed to set channel map, err:%d\n" , __func__, ret); - goto end; +return ret; } }
@@ -117,8 +117,7 @@ static int sdm845_tdm_snd_hw_params(struct snd_pcm_substream *substream, } } -end: -return ret; +return 0 ; } static int sdm845_snd_hw_params(struct snd_pcm_substream *substream,
Signature · 1 line
2.20.1