[PATCH v1] usb: core: driver: Use kmalloc_array

2015-09-07 Thread Muhammad Falak R Wani
Use kmalloc_array instead of kmalloc to allocate memory for an array. Also, remove the dev_warn for a memory leak, making the if check more sleek. Signed-off-by: Muhammad Falak R Wani --- On suggestion by Joe Perches Changes since v0 -remove dev_warn for memory leak -remove

[PATCH v1] usb: core: driver: Use kmalloc_array

2015-09-07 Thread Muhammad Falak R Wani
Use kmalloc_array instead of kmalloc to allocate memory for an array. Also, remove the dev_warn for a memory leak, making the if check more sleek. Signed-off-by: Muhammad Falak R Wani --- On suggestion by Joe Perches Changes since v0 -remove