ethernet: remove redundant memset
kvzalloc already zeroes the memory during the allocation.
pci_alloc_consistent calls dma_alloc_coherent directly.
In commit 518a2f1925
("dma-mapping: zero memory returned from dma_alloc_*"),
dma_alloc_coherent has already zeroed the memory.
So the memset after these function is not needed.
Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
cef86f1536
commit
3a5ee3b301
@@ -207,7 +207,6 @@ static int t4_sched_queue_bind(struct port_info *pi, struct ch_sched_queue *p)
|
||||
goto out_err;
|
||||
|
||||
/* Bind queue to specified class */
|
||||
memset(qe, 0, sizeof(*qe));
|
||||
qe->cntxt_id = qid;
|
||||
memcpy(&qe->param, p, sizeof(qe->param));
|
||||
|
||||
|
Reference in New Issue
Block a user