psetauthparm and precvpriv->pallocated_recv_buf are allocated by kzalloc(). It is unnecessary to call memset again. Signed-off-by: Wan Jiabing <wanjiabing@xxxxxxxx> --- drivers/staging/r8188eu/core/rtw_mlme.c | 1 - drivers/staging/r8188eu/hal/rtl8188eu_recv.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index 8d36ab955b96..6f0bff186477 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -1521,7 +1521,6 @@ int rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv) res = _FAIL; goto exit; } - memset(psetauthparm, 0, sizeof(struct setauth_parm)); psetauthparm->mode = (unsigned char)psecuritypriv->dot11AuthAlgrthm; pcmd->cmdcode = _SetAuth_CMD_; pcmd->parmbuf = (unsigned char *)psetauthparm; diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_recv.c b/drivers/staging/r8188eu/hal/rtl8188eu_recv.c index 322b4549a92d..727e1adce1dc 100644 --- a/drivers/staging/r8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/r8188eu/hal/rtl8188eu_recv.c @@ -31,7 +31,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) res = _FAIL; goto exit; } - memset(precvpriv->pallocated_recv_buf, 0, NR_RECVBUFF * sizeof(struct recv_buf) + 4); precvpriv->precv_buf = (u8 *)N_BYTE_ALIGMENT((size_t)(precvpriv->pallocated_recv_buf), 4); -- 2.35.1