Commit 574bac4f authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

ASoC: Intel: Skylake: Fix a shift wrapping bug

commit c8eabf82 upstream.

"*val" is a u64.  It definitely looks like we intend to use the high 32
bits as well.

Fixes: 700a9a63 ("ASoC: Intel: Skylake: Add module instance id generation APIs")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarVinod Koul <vinod.koul@intel.com>
Tested-by: default avatarKranthi G <gudishax.kranthikumar@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d61a969f
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment