]> git.karo-electronics.de Git - linux-beck.git/commitdiff
vxlan: Fix uninitialized variable warnings.
authorDavid S. Miller <davem@davemloft.net>
Tue, 15 Nov 2016 21:32:11 +0000 (16:32 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Nov 2016 21:32:11 +0000 (16:32 -0500)
drivers/net/vxlan.c: In function ‘vxlan_xmit_one’:
drivers/net/vxlan.c:2141:10: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c

index d536a9340cd5874c76ae4f427ff527d3d48fb520..0a3fd675408f2cbea2eb8d813af77e1d4dbef3a8 100644 (file)
@@ -2065,8 +2065,10 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
                                     dst->sin.sin_addr.s_addr,
                                     &src->sin.sin_addr.s_addr,
                                     dst_cache, info);
-               if (IS_ERR(rt))
+               if (IS_ERR(rt)) {
+                       err = PTR_ERR(rt);
                        goto tx_error;
+               }
 
                /* Bypass encapsulation if the destination is local */
                if (!info) {
@@ -2100,6 +2102,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
                                        &src->sin6.sin6_addr,
                                        dst_cache, info);
                if (IS_ERR(ndst)) {
+                       err = PTR_ERR(ndst);
                        ndst = NULL;
                        goto tx_error;
                }