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

Addresses-Coverity-ID: 1622433 ("Overflowed constant")
Addresses-Coverity-ID: 1630710 ("Overflowed constant")

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

index 364aa21cbd446f493c50924dac2c4002a717f82d..ef1656991d0a668b9af661305f6f0bfe7906e69f 100644 (file)
@@ -254,7 +254,7 @@ static void rtw8852b_pwr_sps_ana(struct rtw89_dev *rtwdev)
 static int rtw8852b_pwr_on_func(struct rtw89_dev *rtwdev)
 {
        u32 val32;
-       u32 ret;
+       int ret;
 
        rtw8852b_pwr_sps_ana(rtwdev);
 
@@ -383,7 +383,7 @@ func_en:
 static int rtw8852b_pwr_off_func(struct rtw89_dev *rtwdev)
 {
        u32 val32;
-       u32 ret;
+       int ret;
 
        rtw8852b_pwr_sps_ana(rtwdev);