summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStephen Hemminger <sthemmin@microsoft.com>2016-08-23 19:17:46 (GMT)
committerDavid S. Miller <davem@davemloft.net>2016-08-23 19:05:36 (GMT)
commite53a9c2a5a8cd0a3a8b3c0f9b7a3ad9bc6a28867 (patch)
treebe816ce9810d06f0fa688959d07950d1bc0428a8 /drivers
parent9477386687354f2aa8f4843170b7093c6dd1eb37 (diff)
downloadlinux-e53a9c2a5a8cd0a3a8b3c0f9b7a3ad9bc6a28867.tar.xz
hv_netvsc: use kcalloc
Better to use kcalloc rather than kzalloc and multiply for an array. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/hyperv/netvsc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index b15edfc..f64c978 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -421,8 +421,8 @@ static int netvsc_init_buf(struct hv_device *device)
net_device->map_words = DIV_ROUND_UP(net_device->send_section_cnt,
BITS_PER_LONG);
- net_device->send_section_map =
- kzalloc(net_device->map_words * sizeof(ulong), GFP_KERNEL);
+ net_device->send_section_map = kcalloc(net_device->map_words,
+ sizeof(ulong), GFP_KERNEL);
if (net_device->send_section_map == NULL) {
ret = -ENOMEM;
goto cleanup;