Adhere to Linux kernel coding style.
Reported by checkpatch:
WARNING: Prefer kmalloc_array over kmalloc with multiply
+ pxmitpriv->pxmitbuf = kmalloc(NR_XMITBUFF * sizeof(struct xmit_buf), GFP_ATOMIC);
Signed-off-by: Tudor Gheorghiu <tudor.reda@gmail.com>
Reviewed-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ZvBy2lB_ok_OCmVI@redaops
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/*init xmit_buf*/
_init_queue(&pxmitpriv->free_xmitbuf_queue);
_init_queue(&pxmitpriv->pending_xmitbuf_queue);
- pxmitpriv->pxmitbuf = kmalloc(NR_XMITBUFF * sizeof(struct xmit_buf), GFP_ATOMIC);
+ pxmitpriv->pxmitbuf = kmalloc_array(NR_XMITBUFF, sizeof(struct xmit_buf), GFP_ATOMIC);
if (!pxmitpriv->pxmitbuf)
goto clean_up_frame_buf;
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;