From: Nicholas Mc Guire Date: Tue, 5 Jan 2016 20:04:13 +0000 (+0100) Subject: staging: rtl8712: consolidate kmalloc + memset 0 to kzalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7c2a2017e5a2a07ffb7732ed88e935824b70b6fb;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Nicholas Mc Guire Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c index 4ff530155187..2a8c49272580 100644 --- a/drivers/staging/rtl8712/rtl871x_recv.c +++ b/drivers/staging/rtl8712/rtl871x_recv.c @@ -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) &