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

Addresses-Coverity-ID: 1624679 ("Overflowed constant")
Addresses-Coverity-ID: 1630970 ("Overflowed constant")

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

index f9766bf30e71df2090a444a3f34d10542ed7c790..1d70f7140827f08fc2e7560c1f2e30b61a17cf7d 100644 (file)
@@ -282,7 +282,7 @@ static int rtw8851b_pwr_on_func(struct rtw89_dev *rtwdev)
 {
        u32 val32;
        u8 val8;
-       u32 ret;
+       int ret;
 
        rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_AFSM_WLSUS_EN |
                                                    B_AX_AFSM_PCIE_SUS_EN);
@@ -401,7 +401,7 @@ static void rtw8851b_patch_swr_pfm2pwm(struct rtw89_dev *rtwdev)
 static int rtw8851b_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);