Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c303373 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller
Browse files

libcxgb: replace vmalloc and memset with vzalloc



Use vzalloc instead of the vmalloc, memset combo

Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c1907e53
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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)) {