Search Linux Wireless

[bug report] mt76: add mac80211 driver for MT7915 PCIe-based chipsets

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

 



Hello Ryder Lee,

The patch e57b7901469f: "mt76: add mac80211 driver for MT7915
PCIe-based chipsets" from Apr 25, 2020, leads to the following static
checker warning:

	drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:1576 mt7915_mcu_add_smps()
	error: 'wtbl_hdr' dereferencing possible ERR_PTR()

drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
  1558  int mt7915_mcu_add_smps(struct mt7915_dev *dev, struct ieee80211_vif *vif,
  1559                          struct ieee80211_sta *sta)
  1560  {
  1561          struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
  1562          struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
  1563          struct wtbl_req_hdr *wtbl_hdr;
  1564          struct tlv *sta_wtbl;
  1565          struct sk_buff *skb;
  1566  
  1567          skb = mt7915_mcu_alloc_sta_req(dev, mvif, msta,
  1568                                         MT7915_STA_UPDATE_MAX_SIZE);
  1569          if (IS_ERR(skb))
  1570                  return PTR_ERR(skb);
  1571  
  1572          sta_wtbl = mt7915_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv));
  1573  
  1574          wtbl_hdr = mt7915_mcu_alloc_wtbl_req(dev, msta, WTBL_SET, sta_wtbl,
                ^^^^^^^^
No error handling.

  1575                                               &skb);
  1576          mt7915_mcu_wtbl_smps_tlv(skb, sta, sta_wtbl, wtbl_hdr);
  1577  
  1578          return __mt76_mcu_skb_send_msg(&dev->mt76, skb,
  1579                                         MCU_EXT_CMD_STA_REC_UPDATE, true);
  1580  }

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