From: Viorel Suman Date: Mon, 13 May 2019 10:02:42 +0000 (+0000) Subject: ASoC: ak4458: rstn_control - return a non-zero on error only X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=176a11834b65ec35e3b7a953f87fb9cc41309497;p=linux.git 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 Signed-off-by: Viorel Suman Reviewed-by: Daniel Baluta Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index 4c5c3ec926095..71562154c0b1e 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,