[kbuild] Re: [PATCH v2 1/2] mt76: mt7915: add missing capabilities for DBDC
Dan Carpenter
dan.carpenter at oracle.com
Wed Mar 10 08:30:18 GMT 2021
Hi Ryder,
url: https://github.com/0day-ci/linux/commits/Ryder-Lee/mt76-mt7915-add-missing-capabilities-for-DBDC/20210225-230323
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: x86_64-randconfig-m001-20210309 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7915/init.c:353 mt7915_set_stream_vht_txbf_caps() error: potentially dereferencing uninitialized 'cap'.
vim +/cap +353 drivers/net/wireless/mediatek/mt76/mt7915/init.c
00b2e16e006390 Ryder Lee 2020-05-12 344 void mt7915_set_stream_vht_txbf_caps(struct mt7915_phy *phy)
00b2e16e006390 Ryder Lee 2020-05-12 345 {
50a6fe79623e22 Ryder Lee 2021-02-25 346 int nss;
50a6fe79623e22 Ryder Lee 2021-02-25 347 u32 *cap;
50a6fe79623e22 Ryder Lee 2021-02-25 348
50a6fe79623e22 Ryder Lee 2021-02-25 349 if (!phy->mt76->cap.has_5ghz)
50a6fe79623e22 Ryder Lee 2021-02-25 350 return;
50a6fe79623e22 Ryder Lee 2021-02-25 351
50a6fe79623e22 Ryder Lee 2021-02-25 352 nss = hweight8(phy->mt76->chainmask);
50a6fe79623e22 Ryder Lee 2021-02-25 @353 *cap = &phy->mt76->sband_5g.sband.vht_cap.cap;
^^^^
"cap" isn't initialized.
00b2e16e006390 Ryder Lee 2020-05-12 354
00b2e16e006390 Ryder Lee 2020-05-12 355 *cap |= IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE |
00b2e16e006390 Ryder Lee 2020-05-12 356 IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE |
00b2e16e006390 Ryder Lee 2020-05-12 357 (3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT);
00b2e16e006390 Ryder Lee 2020-05-12 358
00b2e16e006390 Ryder Lee 2020-05-12 359 *cap &= ~(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK |
00b2e16e006390 Ryder Lee 2020-05-12 360 IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE |
00b2e16e006390 Ryder Lee 2020-05-12 361 IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE);
00b2e16e006390 Ryder Lee 2020-05-12 362
00b2e16e006390 Ryder Lee 2020-05-12 363 if (nss < 2)
00b2e16e006390 Ryder Lee 2020-05-12 364 return;
00b2e16e006390 Ryder Lee 2020-05-12 365
00b2e16e006390 Ryder Lee 2020-05-12 366 *cap |= IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE |
00b2e16e006390 Ryder Lee 2020-05-12 367 IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE |
00b2e16e006390 Ryder Lee 2020-05-12 368 FIELD_PREP(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK,
00b2e16e006390 Ryder Lee 2020-05-12 369 nss - 1);
00b2e16e006390 Ryder Lee 2020-05-12 370 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 41137 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20210310/0723080b/attachment-0001.gz>
-------------- next part --------------
_______________________________________________
kbuild mailing list -- kbuild at lists.01.org
To unsubscribe send an email to kbuild-leave at lists.01.org
More information about the Linux-mediatek
mailing list