diff options
| -rw-r--r-- | sound/soc/codecs/es7243e.c | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/sound/soc/codecs/es7243e.c b/sound/soc/codecs/es7243e.c index cfaf705eff74..fc9239c6030b 100644 --- a/sound/soc/codecs/es7243e.c +++ b/sound/soc/codecs/es7243e.c @@ -306,8 +306,12 @@ static int es7243e_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) if (ret < 0) return ret; - return snd_soc_component_update_bits(component, ES7243E_SDP, - ES7243E_SDP_LRP, sdpfmt); + ret = snd_soc_component_update_bits(component, ES7243E_SDP, + ES7243E_SDP_LRP, sdpfmt); + if (ret < 0) + return ret; + + return 0; } static int es7243e_pcm_startup(struct snd_pcm_substream *substream, @@ -404,16 +408,25 @@ static int es7243e_pcm_hw_params(struct snd_pcm_substream *substream, */ fsleep(50 * USEC_PER_MSEC); val = FIELD_PREP(ES7243E_SDP_MUTE, 0); - return snd_soc_component_update_bits(component, ES7243E_SDP, - ES7243E_SDP_MUTE, val); + ret = snd_soc_component_update_bits(component, ES7243E_SDP, + ES7243E_SDP_MUTE, val); + if (ret < 0) + return ret; + + return 0; } static int es7243e_mute(struct snd_soc_dai *dai, int mute, int direction) { const int val = FIELD_PREP(ES7243E_SDP_MUTE, 3 * !!mute); + int ret; - return snd_soc_component_update_bits(dai->component, ES7243E_SDP, - ES7243E_SDP_MUTE, val); + ret = snd_soc_component_update_bits(dai->component, ES7243E_SDP, + ES7243E_SDP_MUTE, val); + if (ret < 0) + return ret; + + return 0; } static const DECLARE_TLV_DB_RANGE(pga_scale, @@ -576,14 +589,14 @@ static int es7243e_resume(struct snd_soc_component *component) return ret; val = FIELD_PREP(ES7243E_PGA1_EN, 1); - snd_soc_component_update_bits(component, ES7243E_PGA1, - ES7243E_PGA1_EN, val); + ret = snd_soc_component_update_bits(component, ES7243E_PGA1, + ES7243E_PGA1_EN, val); if (ret < 0) return ret; val = FIELD_PREP(ES7243E_PGA2_EN, 1); - snd_soc_component_update_bits(component, ES7243E_PGA2, - ES7243E_PGA2_EN, val); + ret = snd_soc_component_update_bits(component, ES7243E_PGA2, + ES7243E_PGA2_EN, val); if (ret < 0) return ret; |
