mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hao Peng <penghaob@uniontech.com>
To: gregkh@linuxfoundation.org, ross.schm.dev@gmail.com,
	izabela.bakollari@gmail.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Hao Peng <penghaob@uniontech.com>
Subject: [PATCH] staging: rtl8723bs: add initial value
Date: Thu, 11 Mar 2021 14:38:38 +0800	[thread overview]
Message-ID: <20210311063838.19756-1-penghaob@uniontech.com> (raw)

Add initial value for some uninitialized variable and array.

Signed-off-by: Hao Peng <penghaob@uniontech.com>
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index b6f944b37b08..ceea160db38a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -206,8 +206,8 @@ void expire_timeout_chk(struct adapter *padapter)
 	struct sta_info *psta = NULL;
 	struct sta_priv *pstapriv = &padapter->stapriv;
 	u8 chk_alive_num = 0;
-	char chk_alive_list[NUM_STA];
-	int i;
+	char chk_alive_list[NUM_STA] = {0};
+	int i = 0;
 
 	spin_lock_bh(&pstapriv->auth_list_lock);
 
@@ -308,7 +308,7 @@ void expire_timeout_chk(struct adapter *padapter)
 				}
 			}
 			if (pmlmeext->active_keep_alive_check) {
-				int stainfo_offset;
+				int stainfo_offset = 0;
 
 				stainfo_offset = rtw_stainfo_offset(pstapriv, psta);
 				if (stainfo_offset_valid(stainfo_offset))
-- 
2.20.1




             reply	other threads:[~2021-03-11  6:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11  6:38 Hao Peng [this message]
2021-03-12 10:02 ` Dan Carpenter

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=20210311063838.19756-1-penghaob@uniontech.com \
    --to=penghaob@uniontech.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=izabela.bakollari@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ross.schm.dev@gmail.com \
    /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

all inboxes | Powered by JetHome®