git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw
[sfrench/cifs-2.6.git]
/
sound
/
soc
/
soc-ops.c
diff --git
a/sound/soc/soc-ops.c
b/sound/soc/soc-ops.c
index 2d25748ca70662bf771c6896297ccb6a0fb0798f..b27e89ff6a1673f57db6e253a818d6fbe3d1ab91 100644
(file)
--- a/
sound/soc/soc-ops.c
+++ b/
sound/soc/soc-ops.c
@@
-263,7
+263,7
@@
int snd_soc_get_volsw(struct snd_kcontrol *kcontrol,
int max = mc->max;
int min = mc->min;
int sign_bit = mc->sign_bit;
- unsigned int mask = (1 << fls(max)) - 1;
+ unsigned int mask = (1
ULL
<< fls(max)) - 1;
unsigned int invert = mc->invert;
int val;
int ret;