From: Dan Carpenter Date: Sun, 13 May 2012 08:44:18 +0000 (+0000) Subject: openvswitch: checking wrong variable in queue_userspace_packet() X-Git-Tag: v3.4~31^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8aa51d64c1f526e43b1e7f89fb8b98c2fd583f4b;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git openvswitch: checking wrong variable in queue_userspace_packet() "skb" is non-NULL here, for example we dereference it in skb_clone(). The intent was to test "nskb" which was just set. Signed-off-by: Dan Carpenter Acked-by: Jesse Gross Signed-off-by: David S. Miller --- diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 777716b..e66341e 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -321,7 +321,7 @@ static int queue_userspace_packet(int dp_ifindex, struct sk_buff *skb, return -ENOMEM; nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb)); - if (!skb) + if (!nskb) return -ENOMEM; nskb->vlan_tci = 0;