Search Linux Wireless

re: rtw88: support wowlan feature for 8822c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Static analysis with Coverity has found an issue with an uninitialized
variable in the following linux-next commit:

commit 44bc17f7f5b3b2cc4084eba6307ba750078a8a73
Author: Chin-Yen Lee <timlee@xxxxxxxxxxx>
Date:   Thu Dec 19 16:58:14 2019 +0800

    rtw88: support wowlan feature for 8822c

Anaysis is as follows:

284 static bool rtw_wow_check_fw_status(struct rtw_dev *rtwdev, bool
wow_enable)
285 {

   1. var_decl: Declaring variable ret without initializer.
286        bool ret;
287
288        /* wait 100ms for wow firmware to finish work */
289        msleep(100);
290

   2. Condition wow_enable, taking true branch.
291        if (wow_enable) {

   3. Condition !rtw_read8(rtwdev, 455), taking false branch.
292                if (!rtw_read8(rtwdev, REG_WOWLAN_WAKE_REASON))
293                        ret = 0;

   4. Falling through to end of if statement.
294        } else {
295                if (rtw_read32_mask(rtwdev, REG_FE1IMR,
BIT_FS_RXDONE) == 0 &&
296                    rtw_read32_mask(rtwdev, REG_RXPKT_NUM,
BIT_RW_RELEASE) == 0)
297                        ret = 0;
298        }
299

Uninitialized scalar variable (UNINIT)5. uninit_use: Using uninitialized
value ret.

300        if (ret)
301                rtw_err(rtwdev, "failed to check wow status %s\n",
302                        wow_enable ? "enabled" : "disabled");
303
304        return ret;

Colin



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux