[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1379075352-20051-1-git-send-email-prarit@redhat.com>
Date: Fri, 13 Sep 2013 08:29:12 -0400
From: Prarit Bhargava <prarit@...hat.com>
To: netdev@...r.kernel.org
Cc: Prarit Bhargava <prarit@...hat.com>, jpirko@...hat.com,
tgraf@...hat.com, "David S. Miller" <davem@...emloft.net>
Subject: [PATCH] net, vxlan Fix compile warning
Fix a unintialized variable warning.
drivers/net/vxlan.c: In function ‘vxlan_sock_add’:
drivers/net/vxlan.c:2240:11: error: ‘sock’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
vs->sock = sock;
^
drivers/net/vxlan.c:2217:17: note: ‘sock’ was declared here
struct socket *sock;
^
Signed-off-by: Prarit Bhargava <prarit@...hat.com>
Cc: jpirko@...hat.com
Cc: tgraf@...hat.com
Cc: "David S. Miller" <davem@...emloft.net>
---
drivers/net/vxlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index bf64b41..ed3d7f4 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2276,7 +2276,7 @@ static struct vxlan_sock *vxlan_socket_create(struct net *net, __be16 port,
{
struct vxlan_net *vn = net_generic(net, vxlan_net_id);
struct vxlan_sock *vs;
- struct socket *sock;
+ struct socket *uninitialized_var(sock);
struct sock *sk;
int rc = 0;
unsigned int h;
--
1.7.9.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists