linux-stable/sound/pci/ctxfi
Colin Ian King bae4194b35 ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits
[ Upstream commit 26a9630c72 ]

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: 8cc7236148 ("ALSA: SB X-Fi driver merge")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210227001527.1077484-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-11 13:51:04 +01:00
..
ct20k1reg.h
ct20k2reg.h
ctamixer.c
ctamixer.h
ctatc.c
ctatc.h
ctdaio.c
ctdaio.h
cthardware.c
cthardware.h
cthw20k1.c ALSA: ctxfi: make hw structures const 2017-08-23 15:55:18 +02:00
cthw20k1.h
cthw20k2.c ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits 2021-03-11 13:51:04 +01:00
cthw20k2.h
ctimap.c
ctimap.h
ctmixer.c
ctmixer.h
ctpcm.c
ctpcm.h
ctresource.c ALSA: ctxfi: Remove null check before kfree 2017-08-31 20:10:30 +02:00
ctresource.h
ctsrc.c ALSA: ctxfi: Remove null check before kfree 2017-08-31 20:10:30 +02:00
ctsrc.h
cttimer.c
cttimer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctvmem.c
ctvmem.h
Makefile
xfi.c