mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging/rtl8723bs/core: remove inactive initialization
@ 2022-08-02  1:25 Li zeming
  2022-08-02  8:59 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2022-08-02  1:25 UTC (permalink / raw)
  To: gregkh, sevinj.aghayeva, hdegoede, fabioaiuto83, duoming, keescook
  Cc: straube.linux, linux-staging, linux-kernel, 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.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index f2242cf2dfb4..6498fd17e1d3 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -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);
-- 
2.18.2


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

* Re: [PATCH] staging/rtl8723bs/core: remove inactive initialization
  2022-08-02  1:25 [PATCH] staging/rtl8723bs/core: remove inactive initialization Li zeming
@ 2022-08-02  8:59 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2022-08-02  8:59 UTC (permalink / raw)
  To: Li zeming, gregkh, sevinj.aghayeva, fabioaiuto83, duoming, keescook
  Cc: straube.linux, linux-staging, linux-kernel

Hi,

On 8/2/22 03:25, Li zeming wrote:
> 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.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans

> ---
>  drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index f2242cf2dfb4..6498fd17e1d3 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -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);


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

end of thread, other threads:[~2022-08-02  8:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02  1:25 [PATCH] staging/rtl8723bs/core: remove inactive initialization Li zeming
2022-08-02  8:59 ` Hans de Goede

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®