All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: sdm845: remove unnecessary goto
@ 2019-09-24 15:33 Chetan Kankotiya
  0 siblings, 0 replies; only message in thread
From: Chetan Kankotiya @ 2019-09-24 15:33 UTC (permalink / raw)
  To: plai, bgoswami, perex, tiwai; +Cc: linux-kernel

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 <chetankankotiya@gmail.com>
---
 sound/soc/qcom/sdm845.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c
index 28f3cef696e6..e9d6588e61ee 100644
--- a/sound/soc/qcom/sdm845.c
+++ b/sound/soc/qcom/sdm845.c
@@ -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,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-24 15:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-24 15:33 [PATCH] ASoC: sdm845: remove unnecessary goto Chetan Kankotiya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.