diff options
author | Viorel Suman <viorel.suman@nxp.com> | 2019-05-13 13:02:42 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-13 18:12:59 +0300 |
commit | 176a11834b65ec35e3b7a953f87fb9cc41309497 (patch) | |
tree | 79e0c3540ffcf374459b226a4780b5b6a47b9815 /sound/soc | |
parent | 5087a8f17df868601cd7568299e91c28086d2b45 (diff) | |
download | linux-176a11834b65ec35e3b7a953f87fb9cc41309497.tar.xz |
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@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/ak4458.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index 4c5c3ec92609..71562154c0b1 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_component *component, int bit) AK4458_00_CONTROL1, AK4458_RSTN_MASK, 0x0); - return ret; + if (ret < 0) + return ret; + + return 0; } static int ak4458_hw_params(struct snd_pcm_substream *substream, |