Patch "ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-ctxfi-cthw20k2-fix-mask-on-conf-to-allow-4-bits.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9d3f9f5718c22e198737a4bc2542afea6e6bbaf3
Author: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Date:   Sat Feb 27 00:15:27 2021 +0000

    ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits
    
    [ Upstream commit 26a9630c72ebac7c564db305a6aee54a8edde70e ]
    
    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: 8cc72361481f ("ALSA: SB X-Fi driver merge")
    Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210227001527.1077484-1-colin.king@xxxxxxxxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c
index d86678c2a957..5beb4a3d203b 100644
--- a/sound/pci/ctxfi/cthw20k2.c
+++ b/sound/pci/ctxfi/cthw20k2.c
@@ -995,7 +995,7 @@ static int daio_mgr_dao_init(void *blk, unsigned int idx, unsigned int conf)
 
 	if (idx < 4) {
 		/* S/PDIF output */
-		switch ((conf & 0x7)) {
+		switch ((conf & 0xf)) {
 		case 1:
 			set_field(&ctl->txctl[idx], ATXCTL_NUC, 0);
 			break;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux