diff mbox

[Resend,OPW,kernel,v2] Staging: rtl8712: use kmalloc_array over kmalloc

Message ID 20140921001941.GA4052@Tapasweni.Pathak
State New, archived
Headers show

Commit Message

Tapasweni Pathak Sept. 21, 2014, 12:19 a.m. UTC
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>
---
 drivers/staging/rtl8712/rtl871x_xmit.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--
1.7.0.4
diff mbox

Patch

diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c
index de476ad..b616ded 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -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;