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_main.c:457 mt76x2_ampdu_action()
    warn: variable dereferenced before check 'txq' (see line 453)

drivers/net/wireless/mediatek/mt76/mt76x2_main.c
   452		struct ieee80211_txq *txq = sta->txq[params->tid];
   453		struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv;
                                                            ^^^^^^^^^^^^^
Unchecked dereference.  Also the cast is has a checkpatch a space issue.
No space after the cast, because casting is a high precedence operation.

   454		u16 tid = params->tid;
   455		u16 *ssn = &params->ssn;
   456	
   457		if (!txq)
                     ^^^
Check is too late.

   458			return -EINVAL;
   459	

regards,
dan carpenter



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

  Powered by Linux