aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-09-15 16:14:05 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:50:27 -0400
commitacb2cc8b20d6cb9e65c1e442d59a2449d8774157 (patch)
tree54deabaa1238049d0d0a342b7c1b08ad71155c91 /drivers/net/myri10ge
parentbf1e9a080d7766bd65b8d8eb837ecde8b03dcc31 (diff)
[PATCH] drivers/net: remove superfluous memset
This patch covers something like this: dev = alloc_*dev(... ... priv = netdev_priv(dev); memset(priv, 0, sizeof(*priv)); The memset() here is superfluous. alloc_netdev() uses kzalloc() to allocate needed memory so there is no need to zero the priv region twice. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/myri10ge')
-rw-r--r--drivers/net/myri10ge/myri10ge.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 48b23c592406..6dc28b824935 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -2956,7 +2956,6 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2956 SET_NETDEV_DEV(netdev, &pdev->dev); 2956 SET_NETDEV_DEV(netdev, &pdev->dev);
2957 2957
2958 mgp = netdev_priv(netdev); 2958 mgp = netdev_priv(netdev);
2959 memset(mgp, 0, sizeof(*mgp));
2960 mgp->dev = netdev; 2959 mgp->dev = netdev;
2961 netif_napi_add(netdev, &mgp->napi, 2960 netif_napi_add(netdev, &mgp->napi,
2962 myri10ge_poll, myri10ge_napi_weight); 2961 myri10ge_poll, myri10ge_napi_weight);