Skip to content

Commit 2c86291

Browse files
tklauserkuba-moo
authored andcommitted
wireguard: device: omit unnecessary memset of netdev private data
The memory for netdev_priv is allocated using kvzalloc in alloc_netdev_mqs before rtnl_link_ops->setup is called so there is no need to zero it again in wg_setup. Signed-off-by: Tobias Klauser <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Jason A. Donenfeld <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 85c7975 commit 2c86291

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/net/wireguard/device.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ static void wg_setup(struct net_device *dev)
302302
/* We need to keep the dst around in case of icmp replies. */
303303
netif_keep_dst(dev);
304304

305-
memset(wg, 0, sizeof(*wg));
306305
wg->dev = dev;
307306
}
308307

0 commit comments

Comments
 (0)