[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1557408607-25115-2-git-send-email-viorel.suman@nxp.com>
Date: Thu, 9 May 2019 13:30:36 +0000
From: Viorel Suman <viorel.suman@....com>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Viorel Suman <viorel.suman@....com>,
"S.j. Wang" <shengjiu.wang@....com>,
Julia Lawall <Julia.Lawall@...6.fr>,
Daniel Baluta <daniel.baluta@....com>,
Colin Ian King <colin.king@...onical.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: dl-linux-imx <linux-imx@....com>,
Viorel Suman <viorel.suman@...il.com>
Subject: [PATCH 1/2] ASoC: ak4458: rstn_control - return a non-zero on error
only
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 <shengjiu.wang@....com>
Signed-off-by: Viorel Suman <viorel.suman@....com>
---
sound/soc/codecs/ak4458.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c
index eab7c76..4795e32 100644
--- a/sound/soc/codecs/ak4458.c
+++ b/sound/soc/codecs/ak4458.c
@@ -304,7 +304,8 @@ static int ak4458_rstn_control(struct snd_soc_component *component, int bit)
AK4458_00_CONTROL1,
AK4458_RSTN_MASK,
0x0);
- return ret;
+ /* Return a negative error code only. */
+ return (ret < 0 ? ret : 0);
}
static int ak4458_hw_params(struct snd_pcm_substream *substream,
--
2.7.4
Powered by blists - more mailing lists