alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Raphael Poggi <poggi.raph@gmail.com>
To: broonie@kernel.org, lgirdwood@gmail.com
Cc: alsa-devel@alsa-project.org, michael@amarulasolutions.com,
	Raphael Poggi <poggi.raph@gmail.com>
Subject: [PATCH] sound: codecs: pcm1792x: clean function exit
Date: Thu, 14 Jan 2016 10:00:28 +0100	[thread overview]
Message-ID: <1452762028-43931-1-git-send-email-poggi.raph@gmail.com> (raw)

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
---
 sound/soc/codecs/pcm179x.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/sound/soc/codecs/pcm179x.c b/sound/soc/codecs/pcm179x.c
index a56c7b7..e04d13c 100644
--- a/sound/soc/codecs/pcm179x.c
+++ b/sound/soc/codecs/pcm179x.c
@@ -91,14 +91,9 @@ static int pcm179x_digital_mute(struct snd_soc_dai *dai, int mute)
 {
 	struct snd_soc_codec *codec = dai->codec;
 	struct pcm179x_private *priv = snd_soc_codec_get_drvdata(codec);
-	int ret;
 
-	ret = regmap_update_bits(priv->regmap, PCM179X_SOFT_MUTE,
+	return regmap_update_bits(priv->regmap, PCM179X_SOFT_MUTE,
 				 PCM179X_MUTE_MASK, !!mute);
-	if (ret < 0)
-		return ret;
-
-	return 0;
 }
 
 static int pcm179x_hw_params(struct snd_pcm_substream *substream,
@@ -107,7 +102,7 @@ static int pcm179x_hw_params(struct snd_pcm_substream *substream,
 {
 	struct snd_soc_codec *codec = dai->codec;
 	struct pcm179x_private *priv = snd_soc_codec_get_drvdata(codec);
-	int val = 0, ret;
+	int val = 0;
 
 	priv->rate = params_rate(params);
 
@@ -145,12 +140,8 @@ static int pcm179x_hw_params(struct snd_pcm_substream *substream,
 
 	val = val << PCM179X_FMT_SHIFT | PCM179X_ATLD_ENABLE;
 
-	ret = regmap_update_bits(priv->regmap, PCM179X_FMT_CONTROL,
+	return regmap_update_bits(priv->regmap, PCM179X_FMT_CONTROL,
 				 PCM179X_FMT_MASK | PCM179X_ATLD_ENABLE, val);
-	if (ret < 0)
-		return ret;
-
-	return 0;
 }
 
 static const struct snd_soc_dai_ops pcm179x_dai_ops = {
-- 
2.1.0

             reply	other threads:[~2016-01-14  9:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14  9:00 Raphael Poggi [this message]
2016-01-27 12:08 ` [PATCH] sound: codecs: pcm1792x: clean function exit Raphaël Poggi
2016-01-28 23:59   ` Mark Brown

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=1452762028-43931-1-git-send-email-poggi.raph@gmail.com \
    --to=poggi.raph@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=michael@amarulasolutions.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).