[PATCH 16/17] usb: host: ehci-dbg: prefer kmalloc_array over kmalloc times size

From: Geyslan G. Bem
Date: Mon Jan 04 2016 - 15:14:23 EST


This patch fixes a coding style issue reported by checkpatch related to
kmalloc_array usage.

On same line the sizeof operand was enclosed by parenthesis.

Signed-off-by: Geyslan G. Bem <geyslan@xxxxxxxxx>
---
drivers/usb/host/ehci-dbg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index 7f8ad18..2268756 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -678,7 +678,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;
seen_count = 0;
--
2.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/