ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw
[sfrench/cifs-2.6.git] / sound / soc / soc-ops.c
index 2d25748ca70662bf771c6896297ccb6a0fb0798f..b27e89ff6a1673f57db6e253a818d6fbe3d1ab91 100644 (file)
@@ -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 = (1ULL << fls(max)) - 1;
        unsigned int invert = mc->invert;
        int val;
        int ret;