Patch "wifi: rtw89: fix rtw89_read_chip_ver() for RTL8852B and RTL8851B" has been added to the 6.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

    wifi: rtw89: fix rtw89_read_chip_ver() for RTL8852B and RTL8851B

to the 6.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:
     wifi-rtw89-fix-rtw89_read_chip_ver-for-rtl8852b-and-.patch
and it can be found in the queue-6.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 2a43cea28309bffa34373054bc0f845fe464dc48
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Fri Apr 21 13:44:04 2023 +0300

    wifi: rtw89: fix rtw89_read_chip_ver() for RTL8852B and RTL8851B
    
    [ Upstream commit 9d4f491b860ea6d04471c3342093b86a46eee63e ]
    
    The if statement is reversed so it will not record the chip version.
    This was detected using Smatch:
    
        drivers/net/wireless/realtek/rtw89/core.c:3593 rtw89_read_chip_ver()
        error: uninitialized symbol 'val'.
    
    Fixes: a6fb2bb84654 ("wifi: rtw89: read version of analog hardware")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/e4d912a2-37f8-4068-8861-7b9494ae731b@kili.mountain
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index bad864d56bd5c..5423f8ae187f1 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -3584,7 +3584,7 @@ static void rtw89_read_chip_ver(struct rtw89_dev *rtwdev)
 
 	if (chip->chip_id == RTL8852B || chip->chip_id == RTL8851B) {
 		ret = rtw89_mac_read_xtal_si(rtwdev, XTAL_SI_CV, &val);
-		if (!ret)
+		if (ret)
 			return;
 
 		rtwdev->hal.acv = u8_get_bits(val, XTAL_SI_ACV_MASK);



[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