From: Peter Senna Tschudin Date: Mon, 12 Oct 2015 21:22:36 +0000 (+0200) Subject: usb/host/fotg210: change kmalloc by kmalloc_array X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0d88002e2729e93d93631743d57e1f36763ce136;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index ceb696f10710..6ef830809c8d 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -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;