aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-09-30 08:26:23 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-09-30 08:26:22 -0700
commit29f75ab86e40961bbcf2b1747a00eafc8be3d6f7 (patch)
treef674481c11bcd59c48a32e1224495153637dfeb3
parent33f2e13051a58137ee0ac79a5f5780a2579f162f (diff)
parentaec2c17d50b843da310a881399a50dcad25818f6 (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 fc9c9b0ad5f64..63e40b5275a08 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;