From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Lorenzo Bianconi <lorenzo@kernel.org>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, Felix Fietkau <nbd@nbd.name>,
Bo Jiao <Bo.Jiao@mediatek.com>,
Peter Chiu <chui-hao.chiu@mediatek.com>,
Shayne Chen <shayne.chen@mediatek.com>
Subject: drivers/net/wireless/mediatek/mt76/mt7996/main.c:952 mt7996_mac_sta_add_links() error: uninitialized symbol 'err'.
Date: Thu, 10 Apr 2025 09:18:53 +0300 [thread overview]
Message-ID: <47f95421-75f8-418e-9f0f-47775f615d41@stanley.mountain> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3b07108ada81a8ebcebf1fe61367b4e436c895bd
commit: dd82a9e02c054052b5899872c1f32805428f6131 wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks
config: powerpc64-randconfig-r073-20250409 (https://download.01.org/0day-ci/archive/20250410/202504101051.1ya4Z4va-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 92c93f5286b9ff33f27ff694d2dc33da1c07afdd)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202504101051.1ya4Z4va-lkp@intel.com/
New smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7996/main.c:952 mt7996_mac_sta_add_links() error: uninitialized symbol 'err'.
Old smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7996/main.c:73 mt7996_stop_phy() warn: variable dereferenced before check 'phy' (see line 71)
drivers/net/wireless/mediatek/mt76/mt7996/main.c:360 mt7996_set_monitor() warn: variable dereferenced before check 'phy' (see line 358)
vim +/err +952 drivers/net/wireless/mediatek/mt76/mt7996/main.c
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 924 static int
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 925 mt7996_mac_sta_add_links(struct mt7996_dev *dev, struct ieee80211_vif *vif,
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 926 struct ieee80211_sta *sta, unsigned long new_links)
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 927 {
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 928 struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv;
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 929 unsigned int link_id;
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 930 int err;
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 931
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 932 for_each_set_bit(link_id, &new_links, IEEE80211_MLD_MAX_NUM_LINKS) {
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 933 struct mt7996_vif_link *link;
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 934
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 935 if (rcu_access_pointer(msta->link[link_id]))
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 936 continue;
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 937
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 938 link = mt7996_vif_link(dev, vif, link_id);
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 939 if (!link)
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 940 goto error_unlink;
error code?
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 941
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 942 err = mt7996_mac_sta_init_link(dev, vif, link, sta, link_id);
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 943 if (err)
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 944 goto error_unlink;
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 945 }
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 946
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 947 return 0;
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 948
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 949 error_unlink:
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 950 mt7996_mac_sta_remove_links(dev, sta, new_links);
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 951
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 @952 return err;
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 953 }
dd82a9e02c0540 Lorenzo Bianconi 2025-03-11 954
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-04-10 6:18 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=47f95421-75f8-418e-9f0f-47775f615d41@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=Bo.Jiao@mediatek.com \
--cc=chui-hao.chiu@mediatek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=shayne.chen@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
all inboxes | Powered by JetHome®