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

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
...@@ -72,14 +72,12 @@ sint _r8712_init_recv_priv(struct recv_priv *precvpriv, ...@@ -72,14 +72,12 @@ sint _r8712_init_recv_priv(struct recv_priv *precvpriv,
_init_queue(&precvpriv->recv_pending_queue); _init_queue(&precvpriv->recv_pending_queue);
precvpriv->adapter = padapter; precvpriv->adapter = padapter;
precvpriv->free_recvframe_cnt = NR_RECVFRAME; 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, sizeof(union recv_frame) + RXFRAME_ALIGN_SZ,
GFP_ATOMIC); GFP_ATOMIC);
if (precvpriv->pallocated_frame_buf == NULL) if (precvpriv->pallocated_frame_buf == NULL)
return _FAIL; return _FAIL;
kmemleak_not_leak(precvpriv->pallocated_frame_buf); 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 + precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf +
RXFRAME_ALIGN_SZ - RXFRAME_ALIGN_SZ -
((addr_t)(precvpriv->pallocated_frame_buf) & ((addr_t)(precvpriv->pallocated_frame_buf) &
......
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