diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2007-09-15 16:14:05 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:50:27 -0400 |
commit | acb2cc8b20d6cb9e65c1e442d59a2449d8774157 (patch) | |
tree | 54deabaa1238049d0d0a342b7c1b08ad71155c91 /drivers/net/sunlance.c | |
parent | bf1e9a080d7766bd65b8d8eb837ecde8b03dcc31 (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/sunlance.c')
-rw-r--r-- | drivers/net/sunlance.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 68e4f660367d..e94b752f9f34 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -1335,7 +1335,6 @@ static int __devinit sparc_lance_probe_one(struct sbus_dev *sdev, | |||
1335 | return -ENOMEM; | 1335 | return -ENOMEM; |
1336 | 1336 | ||
1337 | lp = netdev_priv(dev); | 1337 | lp = netdev_priv(dev); |
1338 | memset(lp, 0, sizeof(*lp)); | ||
1339 | 1338 | ||
1340 | if (sparc_lance_debug && version_printed++ == 0) | 1339 | if (sparc_lance_debug && version_printed++ == 0) |
1341 | printk (KERN_INFO "%s", version); | 1340 | printk (KERN_INFO "%s", version); |