forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
c1907e53ab
commit
4c30337349
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user