diff options
author | Wan Jiabing <wanjiabing@vivo.com> | 2022-03-18 17:24:48 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-18 13:45:09 +0100 |
commit | 41197a5f11a4b2d11ac19bc62552022153032811 (patch) | |
tree | 2bf4fe76200613424e15078669e8ae4f90cf8ade /drivers/staging/r8188eu | |
parent | 832ce36f44a2c5dd3cb6be6dfb9003715f8dca2a (diff) | |
download | linux-stable-41197a5f11a4b2d11ac19bc62552022153032811.tar.gz linux-stable-41197a5f11a4b2d11ac19bc62552022153032811.tar.bz2 linux-stable-41197a5f11a4b2d11ac19bc62552022153032811.zip |
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>
Diffstat (limited to 'drivers/staging/r8188eu')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_mlme.c | 1 | ||||
-rw-r--r-- | drivers/staging/r8188eu/hal/rtl8188eu_recv.c | 1 |
2 files changed, 0 insertions, 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); |