Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4aa61188 authored by Wu Fengguang's avatar Wu Fengguang Committed by David S. Miller
Browse files

openvswitch: fix odd_ptr_err.cocci warnings



net/openvswitch/vport-gre.c:188:5-11: inconsistent IS_ERR and PTR_ERR, PTR_ERR on line 189

 PTR_ERR should access the value just tested by IS_ERR

Semantic patch information:
 There can be false positives in the patch case, where it is the call
 IS_ERR that is wrong.

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

CC: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Acked-by: default avatarPravin B Shelar <pshelar@nicira.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b8fb4e06
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -186,7 +186,7 @@ static int gre_tnl_send(struct vport *vport, struct sk_buff *skb)
	/* Push Tunnel header. */
	/* Push Tunnel header. */
	skb = __build_header(skb, tunnel_hlen);
	skb = __build_header(skb, tunnel_hlen);
	if (IS_ERR(skb)) {
	if (IS_ERR(skb)) {
		err = PTR_ERR(rt);
		err = PTR_ERR(skb);
		skb = NULL;
		skb = NULL;
		goto err_free_rt;
		goto err_free_rt;
	}
	}