diff options
author | Cristina Moraru <cristina.moraru09@gmail.com> | 2015-10-21 20:00:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-24 19:28:52 -0700 |
commit | 73eee567cbdc3e2f70843a1090786ceb0391061e (patch) | |
tree | ea04d265c443b255aa21b54ca273be8ffa14cba1 /drivers/staging/octeon-usb | |
parent | ffca44fb93e755e3af822966ddf0a5d041d8bd93 (diff) | |
download | blackbird-op-linux-73eee567cbdc3e2f70843a1090786ceb0391061e.tar.gz blackbird-op-linux-73eee567cbdc3e2f70843a1090786ceb0391061e.zip |
staging: octeon-usb: Replace kmalloc with kmalloc_array
Replace kmalloc with specialized function kmalloc_array
when the size is a multiplication of:
number_of_elements * size_of_element
Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon-usb')
-rw-r--r-- | drivers/staging/octeon-usb/octeon-hcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index 61940284311c..6f2871784ba5 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -3216,9 +3216,9 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd, * Allocate a structure to use for our private list of * isochronous packets. */ - iso_packet = kmalloc(urb->number_of_packets * - sizeof(struct cvmx_usb_iso_packet), - GFP_ATOMIC); + iso_packet = kmalloc_array(urb->number_of_packets, + sizeof(struct cvmx_usb_iso_packet), + GFP_ATOMIC); if (iso_packet) { int i; /* Fill the list with the data from the URB */ |