mirror of https://gitee.com/openkylin/linux.git
tehuti: Remove unnecessary memset of netdev private data
The memory for the private data is allocated using kzalloc in alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e56d0b01ed
commit
5eceff7366
|
@ -2033,7 +2033,6 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
/************** priv ****************/
|
||||
priv = nic->priv[port] = netdev_priv(ndev);
|
||||
|
||||
memset(priv, 0, sizeof(struct bdx_priv));
|
||||
priv->pBdxRegs = nic->regs + port * 0x8000;
|
||||
priv->port = port;
|
||||
priv->pdev = pdev;
|
||||
|
|
Loading…
Reference in New Issue