]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
ASoC: Intel: Skylake: Fix a shift wrapping bug
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Oct 2016 08:55:48 +0000 (11:55 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 26 Oct 2016 10:13:55 +0000 (11:13 +0100)
"*val" is a u64.  It definitely looks like we intend to use the high 32
bits as well.

Fixes: 700a9a63f9c1 ("ASoC: Intel: Skylake: Add module instance id generation APIs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Kranthi G <gudishax.kranthikumar@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-sst-utils.c

index 8dc03039b3113fa691626021ec4917a0155cf7e0..ea162fbf68e5b3038f99f1c7ef0ba24590e22c41 100644 (file)
@@ -179,7 +179,7 @@ static inline int skl_getid_32(struct uuid_module *module, u64 *val,
                index = ffz(mask_val);
                pvt_id = index + word1_mask + word2_mask;
                if (pvt_id <= (max_inst - 1)) {
-                       *val |= 1 << (index + word1_mask);
+                       *val |= 1ULL << (index + word1_mask);
                        return pvt_id;
                }
        }