From: Chetan Kankotiya <chetankankotiya@gmail.com>
To: plai@codeaurora.org, bgoswami@codeaurora.org, perex@perex.cz,
tiwai@suse.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: sdm845: remove unnecessary goto
Date: Tue, 24 Sep 2019 21:03:17 +0530 [thread overview]
Message-ID: <20190924153317.GA23893@linux.eic.com> (raw)
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
reply other threads:[~2019-09-24 15:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190924153317.GA23893@linux.eic.com \
--to=chetankankotiya@gmail.com \
--cc=bgoswami@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=plai@codeaurora.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.