Search Linux Wireless

[bug report] wifi: mt76: scan: set vif offchannel link for scanning/roc

[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.

Commit 3ba20af886d1 ("wifi: mt76: scan: set vif offchannel link for
scanning/roc") from Mar 11, 2025, leads to the following Smatch
complaint:

    drivers/net/wireless/mediatek/mt76/channel.c:307 mt76_put_vif_phy_link()
    warn: variable dereferenced before IS_ERR check 'mlink' (see line 305)

drivers/net/wireless/mediatek/mt76/channel.c
   304		struct mt76_dev *dev = phy->dev;
   305		struct mt76_vif_data *mvif = mlink->mvif;
                                             ^^^^^^^^^^^
The patch adds a dereference

   306	
   307		if (IS_ERR_OR_NULL(mlink) || !mlink->offchannel)
                                   ^^^^^
Checked too late.

   308			return;
   309	

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