From: Tapasweni Pathak Date: Sun, 21 Sep 2014 00:19:41 +0000 (+0530) Subject: Staging: rtl8712: use kmalloc_array over kmalloc X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9d76a7e4dc516016e1471f33de218ee0745bbc2d;p=linux-beck.git 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 --- 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;