Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759587AbbKTKJo (ORCPT ); Fri, 20 Nov 2015 05:09:44 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33042 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119AbbKTKJj (ORCPT ); Fri, 20 Nov 2015 05:09:39 -0500 From: Raphael Poggi X-Google-Original-From: Raphael Poggi To: perex@perex.cz, tiwai@suse.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Raphael Poggi Subject: [PATCH 1/4] sound: codecs: pcm1792a: clean function exit Date: Fri, 20 Nov 2015 11:09:14 +0100 Message-Id: <1448014157-36526-2-git-send-email-raphael.poggi@avalun.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1448014157-36526-1-git-send-email-raphael.poggi@avalun.com> References: <1448014157-36526-1-git-send-email-raphael.poggi@avalun.com> X-Antivirus: avast! (VPS 151119-1, 19/11/2015), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1735 Lines: 57 From: Raphael Poggi Signed-off-by: Raphael Poggi --- sound/soc/codecs/pcm1792a.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sound/soc/codecs/pcm1792a.c b/sound/soc/codecs/pcm1792a.c index 08bb486..cf42b24 100644 --- a/sound/soc/codecs/pcm1792a.c +++ b/sound/soc/codecs/pcm1792a.c @@ -91,14 +91,9 @@ static int pcm1792a_digital_mute(struct snd_soc_dai *dai, int mute) { struct snd_soc_codec *codec = dai->codec; struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec); - int ret; - ret = regmap_update_bits(priv->regmap, PCM1792A_SOFT_MUTE, + return regmap_update_bits(priv->regmap, PCM1792A_SOFT_MUTE, PCM1792A_MUTE_MASK, !!mute); - if (ret < 0) - return ret; - - return 0; } static int pcm1792a_hw_params(struct snd_pcm_substream *substream, @@ -107,7 +102,8 @@ static int pcm1792a_hw_params(struct snd_pcm_substream *substream, { struct snd_soc_codec *codec = dai->codec; struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec); - int val = 0, ret; + int val = 0; + int ret = 0; priv->rate = params_rate(params); @@ -147,10 +143,8 @@ static int pcm1792a_hw_params(struct snd_pcm_substream *substream, ret = regmap_update_bits(priv->regmap, PCM1792A_FMT_CONTROL, PCM1792A_FMT_MASK | PCM1792A_ATLD_ENABLE, val); - if (ret < 0) - return ret; - return 0; + return ret; } static const struct snd_soc_dai_ops pcm1792a_dai_ops = { -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/