linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sunliming@linux.dev
To: miriam.rachel.korenblit@intel.com, johannes.berg@intel.com,
	emmanuel.grumbach@intel.com, benjamin.berg@intel.com,
	pagadala.yesu.anjaneyulu@intel.com,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: sunliming <sunliming@kylinos.cn>, kernel test robot <lkp@intel.com>
Subject: [PATCH] wifi: iwlwifi: fix uninitialized variable warning
Date: Tue,  1 Apr 2025 20:10:40 +0800	[thread overview]
Message-ID: <20250401121040.618791-1-sunliming@linux.dev> (raw)

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 --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);
-- 
2.25.1


                 reply	other threads:[~2025-04-01 12:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250401121040.618791-1-sunliming@linux.dev \
    --to=sunliming@linux.dev \
    --cc=benjamin.berg@intel.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=miriam.rachel.korenblit@intel.com \
    --cc=pagadala.yesu.anjaneyulu@intel.com \
    --cc=sunliming@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).