Skip to content
Commit 26a9630c authored by Colin Ian King's avatar Colin Ian King Committed by Takashi Iwai
Browse files

ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits

Currently the mask operation on variable conf is just 3 bits so
the switch statement case value of 8 is unreachable dead code.
The function daio_mgr_dao_init can be passed a 4 bit value,
function dao_rsc_init calls it with conf set to:

     conf = (desc->msr & 0x7) | (desc->passthru << 3);

so clearly when desc->passthru is set to 1 then conf can be
at least 8.

Fix this by changing the mask to 0xf.

Fixes: 8cc72361

 ("ALSA: SB X-Fi driver merge")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210227001527.1077484-1-colin.king@canonical.com
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5f5e6a3e
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