mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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:
parent
cef86f1536
commit
3a5ee3b301
14 changed files with 0 additions and 27 deletions
|
@ -3144,8 +3144,6 @@ static int fec_enet_init(struct net_device *ndev)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(cbd_base, 0, bd_size);
|
||||
|
||||
/* Get the Ethernet address */
|
||||
fec_get_mac(ndev);
|
||||
/* make sure MAC we just acquired is programmed into the hw */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue