]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: rtw89: 8852bt: use 'int' as return type of error code pwr_{on,off}_func()
authorPing-Ke Shih <pkshih@realtek.com>
Wed, 9 Oct 2024 00:42:59 +0000 (08:42 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Sun, 20 Oct 2024 02:31:54 +0000 (10:31 +0800)
The return type of error code of rtw8852bt_pwr_{on,off}_func() and its
callee is 'int'. Correct it.

Addresses-Coverity-ID: 1630962 ("Overflowed constant")
Addresses-Coverity-ID: 1632126 ("Overflowed constant")

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

index dab7e71ec6a140a4e5839153309a4066f1463a1d..38545bf65072ed696af357cdf51350b86a6038d9 100644 (file)
@@ -244,7 +244,7 @@ static const u8 rtw89_btc_8852bt_bt_rssi_thres[BTC_BT_RSSI_THMAX] = {50, 40, 30,
 static int rtw8852bt_pwr_on_func(struct rtw89_dev *rtwdev)
 {
        u32 val32;
-       u32 ret;
+       int ret;
 
        rtw89_write32_set(rtwdev, R_AX_LDO_AON_CTRL0, B_AX_PD_REGU_L);
        rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_AFSM_WLSUS_EN |
@@ -357,7 +357,7 @@ func_en:
 static int rtw8852bt_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);