mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
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>
This commit is contained in:
parent
b373076f60
commit
05437a9117
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user