aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-07-19 22:18:27 +0800
committerDavid S. Miller <davem@davemloft.net>2018-07-21 16:32:59 -0700
commit4c303373497015773234e455fafa5c7c6386d19d (patch)
tree9b173ab1fe85f871f4eefe22c171c0477d992543 /drivers/net/ethernet/chelsio
parentnet: hix5hd2_gmac: use dma_zalloc_coherent instead of allocator/memset (diff)
downloadlinux-dev-4c303373497015773234e455fafa5c7c6386d19d.tar.xz
linux-dev-4c303373497015773234e455fafa5c7c6386d19d.zip
libcxgb: replace vmalloc and memset with vzalloc
Use vzalloc instead of the vmalloc, memset combo Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio')
-rw-r--r--drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c b/drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c
index 0ed161642371..74849be5f004 100644
--- a/drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c
+++ b/drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c
@@ -412,12 +412,10 @@ int cxgbi_ppm_init(void **ppm_pp, struct net_device *ndev,
ppmax * (sizeof(struct cxgbi_ppod_data)) +
ppod_bmap_size * sizeof(unsigned long);
- ppm = vmalloc(alloc_sz);
+ ppm = vzalloc(alloc_sz);
if (!ppm)
goto release_ppm_pool;
- memset(ppm, 0, alloc_sz);
-
ppm->ppod_bmap = (unsigned long *)(&ppm->ppod_data[ppmax]);
if ((ppod_bmap_size >> 3) > (ppmax - ppmax_pool)) {