Skip to content

Commit 41197a5

Browse files
Wan Jiabinggregkh
authored andcommitted
staging: r8188eu: remove unnecessary memset in r8188eu
psetauthparm and precvpriv->pallocated_recv_buf are allocated by kzalloc(). It is unnecessary to call memset again. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Link: https://lore.kernel.org/r/20220318092459.519225-1-wanjiabing@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 832ce36 commit 41197a5

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

drivers/staging/r8188eu/core/rtw_mlme.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,6 @@ int rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv)
15211521
res = _FAIL;
15221522
goto exit;
15231523
}
1524-
memset(psetauthparm, 0, sizeof(struct setauth_parm));
15251524
psetauthparm->mode = (unsigned char)psecuritypriv->dot11AuthAlgrthm;
15261525
pcmd->cmdcode = _SetAuth_CMD_;
15271526
pcmd->parmbuf = (unsigned char *)psetauthparm;

drivers/staging/r8188eu/hal/rtl8188eu_recv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
3131
res = _FAIL;
3232
goto exit;
3333
}
34-
memset(precvpriv->pallocated_recv_buf, 0, NR_RECVBUFF * sizeof(struct recv_buf) + 4);
3534

3635
precvpriv->precv_buf = (u8 *)N_BYTE_ALIGMENT((size_t)(precvpriv->pallocated_recv_buf), 4);
3736

0 commit comments

Comments
 (0)