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

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.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 832ce36f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
+0 −1
Original line number Diff line number Diff line
@@ -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);