projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ASoC: ops: add correct range check for limiting volume
[platform/kernel/linux-starfive.git]
/
sound
/
soc
/
soc-ops.c
diff --git
a/sound/soc/soc-ops.c
b/sound/soc/soc-ops.c
index
55b009d
..
2d25748
100644
(file)
--- a/
sound/soc/soc-ops.c
+++ b/
sound/soc/soc-ops.c
@@
-661,7
+661,7
@@
int snd_soc_limit_volume(struct snd_soc_card *card,
kctl = snd_soc_card_get_kcontrol(card, name);
if (kctl) {
struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value;
- if (max <= mc->max) {
+ if (max <= mc->max
- mc->min
) {
mc->platform_max = max;
ret = 0;
}