[PATCH] drivers/net: remove superfluous memset
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Sat, 15 Sep 2007 20:14:05 +0000 (13:14 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:50:27 +0000 (16:50 -0700)
commitacb2cc8b20d6cb9e65c1e442d59a2449d8774157
tree54deabaa1238049d0d0a342b7c1b08ad71155c91
parentbf1e9a080d7766bd65b8d8eb837ecde8b03dcc31
[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>
drivers/net/fs_enet/fs_enet-main.c
drivers/net/myri10ge/myri10ge.c
drivers/net/netxen/netxen_nic_main.c
drivers/net/sunlance.c
drivers/net/usb/pegasus.c
drivers/net/usb/rtl8150.c