diff mbox series

wifi: iwlwifi: fix uninitialized variable warning

Message ID 20250401121040.618791-1-sunliming@linux.dev
State New
Headers show
Series wifi: iwlwifi: fix uninitialized variable warning | expand

Commit Message

sunliming@linux.dev April 1, 2025, 12:10 p.m. UTC
From: sunliming <sunliming@kylinos.cn>

Fix below kernel warning:
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:513:16: warning: variable 'ret'
is uninitialized when used here [-Wuninitialized]

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: sunliming <sunliming@kylinos.cn>
---
 drivers/net/wireless/intel/iwlwifi/mld/mac80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
index 6851064b82da..7146116b067c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
@@ -475,7 +475,7 @@  static
 int iwl_mld_mac80211_start(struct ieee80211_hw *hw)
 {
 	struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw);
-	int ret;
+	int ret = 0;
 	bool in_d3 = false;
 
 	lockdep_assert_wiphy(mld->wiphy);