You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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>
This commit is contained in:
committed by
David S. Miller
parent
bf1e9a080d
commit
acb2cc8b20
@@ -905,7 +905,6 @@ static int rtl8150_probe(struct usb_interface *intf,
|
||||
}
|
||||
|
||||
dev = netdev_priv(netdev);
|
||||
memset(dev, 0, sizeof(rtl8150_t));
|
||||
|
||||
dev->intr_buff = kmalloc(INTBUFSIZE, GFP_KERNEL);
|
||||
if (!dev->intr_buff) {
|
||||
|
||||
Reference in New Issue
Block a user