[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190924153317.GA23893@linux.eic.com>
Date: Tue, 24 Sep 2019 21:03:17 +0530
From: Chetan Kankotiya <chetankankotiya@...il.com>
To: plai@...eaurora.org, bgoswami@...eaurora.org, perex@...ex.cz,
tiwai@...e.com
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] 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 <chetankankotiya@...il.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
Powered by blists - more mailing lists