]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: rtw89: 8852c: use 'int' as return type of error code pwr_{on,off}_func()
authorPing-Ke Shih <pkshih@realtek.com>
Wed, 9 Oct 2024 00:43:00 +0000 (08:43 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Sun, 20 Oct 2024 02:32:02 +0000 (10:32 +0800)
The return type of error code of rtw8852c_pwr_{on,off}_func() and its
callee is 'int'. Correct it.

Addresses-Coverity-ID: 1626056 ("Overflowed constant")
Addresses-Coverity-ID: 1627945 ("Overflowed constant")

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241009004300.8144-7-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/rtw8852c.c

index dbe77abb2c488fbd1df60d85bfa9b5b5328b5083..c58b3e8068f463e7694f688d782bb4b729029176 100644 (file)
@@ -203,7 +203,7 @@ static void rtw8852c_ctrl_tx_path_tmac(struct rtw89_dev *rtwdev, u8 tx_path,
 static int rtw8852c_pwr_on_func(struct rtw89_dev *rtwdev)
 {
        u32 val32;
-       u32 ret;
+       int ret;
 
        val32 = rtw89_read32_mask(rtwdev, R_AX_SYS_STATUS1, B_AX_PAD_HCI_SEL_V2_MASK);
        if (val32 == MAC_AX_HCI_SEL_PCIE_USB)
@@ -324,7 +324,7 @@ static int rtw8852c_pwr_on_func(struct rtw89_dev *rtwdev)
 static int rtw8852c_pwr_off_func(struct rtw89_dev *rtwdev)
 {
        u32 val32;
-       u32 ret;
+       int ret;
 
        ret = rtw89_mac_write_xtal_si(rtwdev, XTAL_SI_ANAPAR_WL, XTAL_SI_RFC2RF,
                                      XTAL_SI_RFC2RF);