Skip to content

Commit

Permalink
openvswitch: fix odd_ptr_err.cocci warnings
Browse files Browse the repository at this point in the history
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: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wu Fengguang authored and David S. Miller committed Dec 24, 2014
1 parent b8fb4e0 commit 4aa6118
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/openvswitch/vport-gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static int gre_tnl_send(struct vport *vport, struct sk_buff *skb)
/* Push Tunnel header. */
skb = __build_header(skb, tunnel_hlen);
if (IS_ERR(skb)) {
err = PTR_ERR(rt);
err = PTR_ERR(skb);
skb = NULL;
goto err_free_rt;
}
Expand Down

0 comments on commit 4aa6118

Please sign in to comment.