diff options
author | David S. Miller <davem@davemloft.net> | 2016-11-15 16:32:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-15 16:32:11 -0500 |
commit | 8ebd115bb23ac42f14a5e242500be61d8606b82d (patch) | |
tree | bc3be082407341816dc4260493f1b3185c5d009c /drivers/net | |
parent | 81fea579aa57750bb42ed9de5790c48357435cea (diff) |
vxlan: Fix uninitialized variable warnings.
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/vxlan.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index d536a9340cd5..0a3fd675408f 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -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; } |