summaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-11-07 22:09:07 +0100
committerDavid S. Miller <davem@davemloft.net>2016-11-09 18:59:50 -0500
commit4053ab1bf98dd128344b9e67ef139f931a967ae1 (patch)
tree45bfdd24fded10417afccebdfdf182e08ddbdfde /drivers/net/vxlan.c
parent6dbcd8fb5968fda3a5fba019dfb0c80c3139627b (diff)
downloadop-kernel-dev-4053ab1bf98dd128344b9e67ef139f931a967ae1.zip
op-kernel-dev-4053ab1bf98dd128344b9e67ef139f931a967ae1.tar.gz
vxlan: hide unused local variable
A bugfix introduced a harmless warning in v4.9-rc4: drivers/net/vxlan.c: In function 'vxlan_group_used': drivers/net/vxlan.c:947:21: error: unused variable 'sock6' [-Werror=unused-variable] This hides the variable inside of the same #ifdef that is around its user. The extraneous initialization is removed at the same time, it was accidentally introduced in the same commit. Fixes: c6fcc4fc5f8b ("vxlan: avoid using stale vxlan socket.") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index f3c2fa3..24532cd 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -944,7 +944,9 @@ static bool vxlan_group_used(struct vxlan_net *vn, struct vxlan_dev *dev)
{
struct vxlan_dev *vxlan;
struct vxlan_sock *sock4;
- struct vxlan_sock *sock6 = NULL;
+#if IS_ENABLED(CONFIG_IPV6)
+ struct vxlan_sock *sock6;
+#endif
unsigned short family = dev->default_dst.remote_ip.sa.sa_family;
sock4 = rtnl_dereference(dev->vn4_sock);
OpenPOWER on IntegriCloud