[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1442847678-7970-6-git-send-email-peter.senna@gmail.com>
Date: Mon, 21 Sep 2015 17:01:09 +0200
From: Peter Senna Tschudin <peter.senna@...il.com>
To: balbi@...com, stern@...land.harvard.edu,
sergei.shtylyov@...entembedded.com, standby24x7@...il.com,
pmladek@...e.cz, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org
Cc: Peter Senna Tschudin <peter.senna@...il.com>
Subject: [PATCH 05/14] RFC: usb/host/fotg210: change kmalloc by kmalloc_array
This patch change:
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@...il.com>
---
drivers/usb/host/fotg210-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index 51feb61..e7e9991 100644
--- a/drivers/usb/host/fotg210-hcd.c
+++ b/drivers/usb/host/fotg210-hcd.c
@@ -501,7 +501,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;
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists