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/usb/rtl8150.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/usb/rtl8150.c')
-rw-r--r-- | drivers/net/usb/rtl8150.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index fa598f0340c..3b3a57ea267 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c | |||
@@ -905,7 +905,6 @@ static int rtl8150_probe(struct usb_interface *intf, | |||
905 | } | 905 | } |
906 | 906 | ||
907 | dev = netdev_priv(netdev); | 907 | dev = netdev_priv(netdev); |
908 | memset(dev, 0, sizeof(rtl8150_t)); | ||
909 | 908 | ||
910 | dev->intr_buff = kmalloc(INTBUFSIZE, GFP_KERNEL); | 909 | dev->intr_buff = kmalloc(INTBUFSIZE, GFP_KERNEL); |
911 | if (!dev->intr_buff) { | 910 | if (!dev->intr_buff) { |