Message ID | 20190630142949.GA7422@hari-Inspiron-1545 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | net: ethernet: broadcom: bcm63xx_enet: Remove unneeded memset | expand |
From: Hariprasad Kelam <hariprasad.kelam@gmail.com> Date: Sun, 30 Jun 2019 19:59:49 +0530 > Remove unneeded memset as alloc_etherdev is using kvzalloc which uses > __GFP_ZERO flag > > Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> Applied to net-next, thanks.
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index 85e6102..f2dd74c 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -2659,8 +2659,7 @@ static int bcm_enetsw_probe(struct platform_device *pdev) if (!dev) return -ENOMEM; priv = netdev_priv(dev); - memset(priv, 0, sizeof(*priv)); - + /* initialize default and fetch platform data */ priv->enet_is_sw = true; priv->irq_rx = irq_rx;
Remove unneeded memset as alloc_etherdev is using kvzalloc which uses __GFP_ZERO flag Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)