[PATCH] mt76: mt7915: fix warning: variable 'base' is used uninitialized

Bo Jiao bo.jiao at mediatek.com
Wed Dec 22 22:58:16 PST 2021


From: Bo Jiao <Bo.Jiao at mediatek.com>

fix warning: variable 'base' is used uninitialized

Fixes: 22c2fb9495d3 ("mt76: mt7915: rework dma.c to adapt mt7916 changes")
Reported-by: kernel test robot <lkp at intel.com>
Signed-off-by: Bo Jiao <Bo.Jiao at mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/dma.c b/drivers/net/wireless/mediatek/mt76/mt7915/dma.c
index 4106d73..2dc2d6b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/dma.c
@@ -83,7 +83,7 @@ static void mt7915_dma_config(struct mt7915_dev *dev)
 static void __mt7915_dma_prefetch(struct mt7915_dev *dev, u32 ofs)
 {
 #define PREFETCH(_base, _depth)	((_base) << 16 | (_depth))
-	u32 base;
+	u32 base = 0;
 
 	/* prefetch SRAM wrapping boundary for tx/rx ring. */
 	mt76_wr(dev, MT_MCUQ_EXT_CTRL(MT_MCUQ_FWDL) + ofs, PREFETCH(0x0, 0x4));
-- 
2.18.0




More information about the Linux-mediatek mailing list