summaryrefslogtreecommitdiffstats
path: root/drivers/net/geneve.c
diff options
context:
space:
mode:
authorpravin shelar <pshelar@ovn.org>2016-11-21 11:03:00 -0800
committerDavid S. Miller <davem@davemloft.net>2016-11-21 14:05:49 -0500
commitbcceeec3ccc413b11b41bd0559c7e8537ca9916e (patch)
treebfa59dfed2f4b345de5aa08d6ea561af32a373d1 /drivers/net/geneve.c
parentc3ef5aa5e5f853168fe9728f390bfa2141eef4ec (diff)
downloadblackbird-op-linux-bcceeec3ccc413b11b41bd0559c7e8537ca9916e.tar.gz
blackbird-op-linux-bcceeec3ccc413b11b41bd0559c7e8537ca9916e.zip
geneve: Remove redundant socket checks.
Geneve already has check for device socket in route lookup function. So no need to check it in xmit function. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/geneve.c')
-rw-r--r--drivers/net/geneve.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 95dd19a3cafe..ab9fea6936a2 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -785,14 +785,11 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
struct geneve_sock *gs4 = rcu_dereference(geneve->sock4);
const struct ip_tunnel_key *key = &info->key;
struct rtable *rt;
- int err = -EINVAL;
struct flowi4 fl4;
__u8 tos, ttl;
__be16 sport;
__be16 df;
-
- if (!gs4)
- return err;
+ int err;
rt = geneve_get_v4_rt(skb, dev, &fl4, info);
if (IS_ERR(rt))
@@ -828,13 +825,10 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
struct geneve_sock *gs6 = rcu_dereference(geneve->sock6);
const struct ip_tunnel_key *key = &info->key;
struct dst_entry *dst = NULL;
- int err = -EINVAL;
struct flowi6 fl6;
__u8 prio, ttl;
__be16 sport;
-
- if (!gs6)
- return err;
+ int err;
dst = geneve_get_v6_dst(skb, dev, &fl6, info);
if (IS_ERR(dst))
OpenPOWER on IntegriCloud