Staging: rtl8712: use kmalloc_array over kmalloc

This patch fixes checkpatch.pl warning in file rtl871x_xmit.c
WARNING : prefer kmalloc_array over kmalloc with multiply

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tapasweni Pathak 2014-09-21 05:49:41 +05:30 committed by Greg Kroah-Hartman
parent 15a4db9268
commit 9d76a7e4dc
1 changed files with 2 additions and 2 deletions

View File

@ -955,8 +955,8 @@ static void alloc_hwxmits(struct _adapter *padapter)
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
pxmitpriv->hwxmits = kmalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry,
GFP_ATOMIC);
pxmitpriv->hwxmits = kmalloc_array(pxmitpriv->hwxmit_entry,
sizeof(struct hw_xmit), GFP_ATOMIC);
if (pxmitpriv->hwxmits == NULL)
return;
hwxmits = pxmitpriv->hwxmits;