summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-11-20 02:25:23 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-11-20 02:25:23 -0800
commitff7554df6b5f6513d367a42a359a1a22eae4ebf0 (patch)
treea74cd62a3d523bdd1a8ad2c82975983eceede6f6
parent902c515ab35b6f7bd889ecec2da8a0797ce96b4d (diff)
parent10a33754bc4c369804a5ce198d1f91919b48bba5 (diff)
Merge "ASoC: Fix UBSAN warning at snd_soc_get/put_volsw_sx()"
-rw-r--r--sound/soc/soc-ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index 92ccddea1fc5..c7d60e532461 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -379,7 +379,7 @@ int snd_soc_get_volsw_sx(struct snd_kcontrol *kcontrol,
unsigned int rshift = mc->rshift;
int max = mc->max;
int min = mc->min;
- unsigned int mask = (1 << (fls(min + max) - 1)) - 1;
+ unsigned int mask = (1U << (fls(min + max) - 1)) - 1;
unsigned int val;
int ret;
@@ -424,7 +424,7 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
unsigned int rshift = mc->rshift;
int max = mc->max;
int min = mc->min;
- unsigned int mask = (1 << (fls(min + max) - 1)) - 1;
+ unsigned int mask = (1U << (fls(min + max) - 1)) - 1;
int err = 0;
unsigned int val, val_mask, val2 = 0;