From: Viorel Suman Subject: [PATCH V2 1/2] ASoC: ak4458: rstn_control - return a non-zero on error only Date: Mon, 13 May 2019 10:02:42 +0000 Message-ID: <1557741724-6859-2-git-send-email-viorel.suman@nxp.com> References: <1557741724-6859-1-git-send-email-viorel.suman@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1557741724-6859-1-git-send-email-viorel.suman@nxp.com> Content-Language: en-US Content-ID: Sender: linux-kernel-owner@vger.kernel.org To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Viorel Suman , "S.j. Wang" , Daniel Baluta , Julia Lawall , Colin Ian King , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" Cc: dl-linux-imx , Viorel Suman List-Id: alsa-devel@alsa-project.org snd_soc_component_update_bits() may return 1 if operation was successful and the value of the register changed. Return a non-zero in ak4458_rstn_control for an error only. Signed-off-by: Shengjiu Wang Signed-off-by: Viorel Suman --- sound/soc/codecs/ak4458.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index eab7c76..baf990a 100644 --- a/sound/soc/codecs/ak4458.c +++ b/sound/soc/codecs/ak4458.c @@ -304,7 +304,10 @@ static int ak4458_rstn_control(struct snd_soc_componen= t *component, int bit) AK4458_00_CONTROL1, AK4458_RSTN_MASK, 0x0); - return ret; + if (ret < 0) + return ret; + + return 0; } =20 static int ak4458_hw_params(struct snd_pcm_substream *substream, --=20 2.7.4