Commit 41197a5f authored by Wan Jiabing's avatar Wan Jiabing Committed by Greg Kroah-Hartman

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: default avatarWan Jiabing <wanjiabing@vivo.com>
Link: https://lore.kernel.org/r/20220318092459.519225-1-wanjiabing@vivo.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 832ce36f
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment