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>
This commit is contained in:
Viorel Suman 2019-05-13 10:02:42 +00:00 committed by Mark Brown
parent 5087a8f17d
commit 176a11834b
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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,