summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireguard/device.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2024-11-17 22:20:27 +0100
committerJakub Kicinski <kuba@kernel.org>2024-11-19 04:32:27 +0100
commit2c862914fbcf85609147401ea8674ae9a9e3b8cc (patch)
tree2f0f0a9b9de5ac7a258a83aa3e4e5d4a9b538b06 /drivers/net/wireguard/device.c
parentnet: ip: fix unexpected return in fib_validate_source() (diff)
downloadlinux-2c862914fbcf85609147401ea8674ae9a9e3b8cc.tar.xz
linux-2c862914fbcf85609147401ea8674ae9a9e3b8cc.zip
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 <tklauser@distanz.ch> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Link: https://patch.msgid.link/20241117212030.629159-2-Jason@zx2c4.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/net/wireguard/device.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/wireguard/device.c b/drivers/net/wireguard/device.c
index 45e9b908dbfb..a2ba71fbbed4 100644
--- a/drivers/net/wireguard/device.c
+++ b/drivers/net/wireguard/device.c
@@ -302,7 +302,6 @@ static void wg_setup(struct net_device *dev)
/* We need to keep the dst around in case of icmp replies. */
netif_keep_dst(dev);
- memset(wg, 0, sizeof(*wg));
wg->dev = dev;
}