From: Dan Carpenter <dan.carpenter@oracle.com>
To: ryder.lee@mediatek.com
Cc: Ryder Lee <ryder.lee@mediatek.com>,
linux-wireless@vger.kernel.org,
linux-mediatek@lists.infradead.org
Subject: [bug report] mt76: add mac80211 driver for MT7915 PCIe-based chipsets
Date: Wed, 20 May 2020 15:08:26 +0300 [thread overview]
Message-ID: <20200520120826.GJ172354@mwanda> (raw)
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
next reply other threads:[~2020-05-20 12:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 12:08 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-05-20 12:02 [bug report] mt76: add mac80211 driver for MT7915 PCIe-based chipsets Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200520120826.GJ172354@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=ryder.lee@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).