sound: codecs: pcm1792x: clean function exit
diff mbox

Message ID 1452762028-43931-1-git-send-email-poggi.raph@gmail.com
State New
Headers show

Commit Message

Raphaël Poggi Jan. 14, 2016, 9 a.m. UTC
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
---
 sound/soc/codecs/pcm179x.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

Comments

Raphaël Poggi Jan. 27, 2016, 12:08 p.m. UTC | #1
ping ?

2016-01-14 10:00 GMT+01:00 Raphael Poggi <poggi.raph@gmail.com>:
> 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
>
Mark Brown Jan. 28, 2016, 11:59 p.m. UTC | #2
On Wed, Jan 27, 2016 at 01:08:04PM +0100, Raphaël Poggi wrote:
> ping ?
> 
> 2016-01-14 10:00 GMT+01:00 Raphael Poggi <poggi.raph@gmail.com>:

Please allow a reasonable time for review (especially during the merge
window), people get busy, go on holiday or otherwise don't have time to
answer immediately.

Please also don't top post, reply in line with needed context.  This
allows readers to readily follow the flow of conversation and understand
what you are talking about and also helps ensure that everything in the
discussion is being addressed.

Patch
diff mbox

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 = {