diff mbox series

mt76: mt7915: fix 'nrates' is uninitialized when used here

Message ID 6bacb2514f00d8483d24f60e232718923f16890c.1630048924.git.ryder.lee@mediatek.com (mailing list archive)
State Deferred
Delegated to: Felix Fietkau
Headers show
Series mt76: mt7915: fix 'nrates' is uninitialized when used here | expand

Commit Message

Ryder Lee Aug. 27, 2021, 7:25 a.m. UTC
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:2105:3: warning:
variable 'nrates' is uninitialized when used here [-Wuninitialized]

Fixes: 48469214f50c ("mt76: mt7915: rework .set_bitrate_mask() to support more options")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index 8141a42b2d0b..4e6d9e20cc00 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -2092,7 +2092,7 @@  mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
 	struct cfg80211_bitrate_mask *mask = &mvif->bitrate_mask;
 	enum nl80211_band band = chandef->chan->band;
 	struct sta_phy phy = {};
-	int ret, nrates;
+	int ret, nrates = 0;
 
 #define __sta_phy_bitrate_mask_check(_mcs, _gi, _he)				\
 	do {									\