mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
usb/host/fotg210: change kmalloc by kmalloc_array
This patch replaces: kmalloc(DBG_SCHED_LIMIT * sizeof(*seen), GFP_ATOMIC) by: kmalloc_array(DBG_SCHED_LIMIT, sizeof(*seen), GFP_ATOMIC) as kmalloc_array() should be used for allocating arrays. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f238b4e2b3
commit
0d88002e27
1 changed files with 1 additions and 1 deletions
|
@ -500,7 +500,7 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
|
|||
unsigned i;
|
||||
__hc32 tag;
|
||||
|
||||
seen = kmalloc(DBG_SCHED_LIMIT * sizeof(*seen), GFP_ATOMIC);
|
||||
seen = kmalloc_array(DBG_SCHED_LIMIT, sizeof(*seen), GFP_ATOMIC);
|
||||
if (!seen)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue