Search Linux Wireless

[bug report] mt76: add driver code for MT76x2e

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

 



Hello Felix Fietkau,

This is a semi-automatic email about new static checker warnings.

The patch 7bc04215a66b: "mt76: add driver code for MT76x2e" from Nov 
21, 2017, leads to the following Smatch complaint:

    drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:189 mt76x2_mac_write_txwi()
    error: we previously assumed 'wcid' could be null (see line 180)

drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
   179	
   180		if (wcid)
                    ^^^^
Check for NULL

   181			txwi->wcid = wcid->idx;
   182		else
   183			txwi->wcid = 0xff;
   184	
   185		txwi->pktid = 1;
   186	
   187		spin_lock_bh(&dev->mt76.lock);
   188		if (rate->idx < 0 || !rate->count) {
   189			txwi->rate = wcid->tx_rate;
                                     ^^^^^^^^^^^^^
Unchecked dereference

   190			max_txpwr_adj = wcid->max_txpwr_adj;
   191			nss = wcid->tx_rate_nss;

regards,
dan carpenter



[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