Commit 7c2a2017 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Greg Kroah-Hartman
Browse files

staging: rtl8712: consolidate kmalloc + memset 0 to kzalloc



This is an API consolidation only. The use of kmalloc + memset to 0
here is equivalent to kzalloc.

Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 39e9526c
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -72,14 +72,12 @@ sint _r8712_init_recv_priv(struct recv_priv *precvpriv,
	_init_queue(&precvpriv->recv_pending_queue);
	precvpriv->adapter = padapter;
	precvpriv->free_recvframe_cnt = NR_RECVFRAME;
	precvpriv->pallocated_frame_buf = kmalloc(NR_RECVFRAME *
	precvpriv->pallocated_frame_buf = kzalloc(NR_RECVFRAME *
				sizeof(union recv_frame) + RXFRAME_ALIGN_SZ,
				GFP_ATOMIC);
	if (precvpriv->pallocated_frame_buf == NULL)
		return _FAIL;
	kmemleak_not_leak(precvpriv->pallocated_frame_buf);
	memset(precvpriv->pallocated_frame_buf, 0, NR_RECVFRAME *
		sizeof(union recv_frame) + RXFRAME_ALIGN_SZ);
	precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf +
				    RXFRAME_ALIGN_SZ -
				    ((addr_t)(precvpriv->pallocated_frame_buf) &