All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: nbd@nbd.name
Cc: linux-mediatek@lists.infradead.org
Subject: [bug report] mt76: mt7915: add encap offload for 4-address mode stations
Date: Thu, 10 Dec 2020 11:41:40 +0300	[thread overview]
Message-ID: <X9HfRCXMxlWtGPIw@mwanda> (raw)

Hello Felix Fietkau,

The patch e151d71e503d: "mt76: mt7915: add encap offload for
4-address mode stations" from Aug 21, 2020, leads to the following
static checker warning:

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

drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
  1676  int mt7915_mcu_sta_update_hdr_trans(struct mt7915_dev *dev,
  1677                                      struct ieee80211_vif *vif,
  1678                                      struct ieee80211_sta *sta)
  1679  {
  1680          struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
  1681          struct wtbl_req_hdr *wtbl_hdr;
  1682          struct sk_buff *skb;
  1683  
  1684          skb = mt76_mcu_msg_alloc(&dev->mt76, NULL, MT7915_WTBL_UPDATE_MAX_SIZE);
  1685          if (!skb)
  1686                  return -ENOMEM;
  1687  
  1688          wtbl_hdr = mt7915_mcu_alloc_wtbl_req(dev, msta, WTBL_SET, NULL, &skb);
  1689          mt7915_mcu_wtbl_hdr_trans_tlv(skb, vif, sta, NULL, wtbl_hdr);
                                                                   ^^^^^^^^

No check for if mt7915_mcu_alloc_wtbl_req() fails.

  1690  
  1691          return mt76_mcu_skb_send_msg(&dev->mt76, skb, MCU_EXT_CMD_WTBL_UPDATE,
  1692                                       true);
  1693  }

regards,
dan carpenter

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

                 reply	other threads:[~2020-12-10  8:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=X9HfRCXMxlWtGPIw@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=nbd@nbd.name \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.