From 9d76a7e4dc516016e1471f33de218ee0745bbc2d Mon Sep 17 00:00:00 2001 From: Tapasweni Pathak Date: Sun, 21 Sep 2014 05:49:41 +0530 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/rtl871x_xmit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c index ca7e6e4f7b8d..f49acaf04076 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; -- 2.39.5