Skip to contentSkip to conversation

staging/rtl8723bs/core: remove inactive initialization

PATCH In review Li zeming 2 participants 2 messages Aug 2, 2022 Staging

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 staging/rtl8723bs/core: remove inactive initialization

The allocation address of the psta pointer variable is first performed in the function, no initialization assignment is required, and no invalid pointer will appear.

---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_mlme.c +1 -1
index f2242cf2dfb4..6498fd17e1d3 100644
@@ -2521,7 +2521,7 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr
 {
 	u8 issued;
 	int priority;
-	struct sta_info *psta = NULL;
+	struct sta_info *psta;
 	struct ht_priv *phtpriv;
 	struct pkt_attrib *pattrib = &pxmitframe->attrib;
 	s32 bmcst = IS_MCAST(pattrib->ra);
Signature · 1 line
2.18.2
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 5 lines · Li zeming

The allocation address of the psta pointer variable is first performed in the function, no initialization assignment is required, and no invalid pointer will appear.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 17 lines
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_mlme.c +1 -1
index f2242cf2dfb4..6498fd17e1d3 100644
@@ -2521,7 +2521,7 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr
 {
 	u8 issued;
 	int priority;
-	struct sta_info *psta = NULL;
+	struct sta_info *psta;
 	struct ht_priv *phtpriv;
 	struct pkt_attrib *pattrib = &pxmitframe->attrib;
 	s32 bmcst = IS_MCAST(pattrib->ra);