public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: add initial value
@ 2021-03-11  6:38 Hao Peng
  2021-03-12 10:02 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Hao Peng @ 2021-03-11  6:38 UTC (permalink / raw)
  To: gregkh, ross.schm.dev, izabela.bakollari; +Cc: devel, linux-kernel, Hao Peng

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-12 10:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-11  6:38 [PATCH] staging: rtl8723bs: add initial value Hao Peng
2021-03-12 10:02 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox