diff options
author | Mark Brown <broonie@kernel.org> | 2023-02-24 14:03:57 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-02-28 13:58:54 +0000 |
commit | 05437a91173b8780692ac35313f98cac68be7c42 (patch) | |
tree | 20a093bd52cdb4e9f798ad8a92b1ecfd8a79c79d /sound/soc | |
parent | b373076f609993d333dbbc3283b65320c7a41834 (diff) |
ASoC: mt8192: Report an error if when an invalid sidetone gain is written
Reporting an error on invalid values is optional but helpful to userspace
so do so.
Reviewed-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Tested-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-3-9a85f90368e1@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/mediatek/mt8192/mt8192-dai-adda.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-adda.c b/sound/soc/mediatek/mt8192/mt8192-dai-adda.c index a33d1ce33349..a02a297c0450 100644 --- a/sound/soc/mediatek/mt8192/mt8192-dai-adda.c +++ b/sound/soc/mediatek/mt8192/mt8192-dai-adda.c @@ -601,6 +601,8 @@ static int stf_positive_gain_set(struct snd_kcontrol *kcontrol, POSITIVE_GAIN_MASK_SFT, (gain_db / 6) << POSITIVE_GAIN_SFT, &change); + } else { + return -EINVAL; } return change; |