Commit 05437a91 authored by Mark Brown's avatar Mark Brown

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: default avatarNícolas F. R. A. Prado <nfraprado@collabora.com>
Tested-by: default avatarNícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-3-9a85f90368e1@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b373076f
...@@ -601,6 +601,8 @@ static int stf_positive_gain_set(struct snd_kcontrol *kcontrol, ...@@ -601,6 +601,8 @@ static int stf_positive_gain_set(struct snd_kcontrol *kcontrol,
POSITIVE_GAIN_MASK_SFT, POSITIVE_GAIN_MASK_SFT,
(gain_db / 6) << POSITIVE_GAIN_SFT, (gain_db / 6) << POSITIVE_GAIN_SFT,
&change); &change);
} else {
return -EINVAL;
} }
return change; return change;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment