[<prev] [next>] [day] [month] [year] [list]
Message-ID: <47f95421-75f8-418e-9f0f-47775f615d41@stanley.mountain>
Date: Thu, 10 Apr 2025 09:18:53 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev, Lorenzo Bianconi <lorenzo@...nel.org>
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, Felix Fietkau <nbd@....name>,
Bo Jiao <Bo.Jiao@...iatek.com>,
Peter Chiu <chui-hao.chiu@...iatek.com>,
Shayne Chen <shayne.chen@...iatek.com>
Subject: drivers/net/wireless/mediatek/mt76/mt7996/main.c:952
mt7996_mac_sta_add_links() error: uninitialized symbol 'err'.
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@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.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
Powered by blists - more mailing lists