Fix return check typo.

Signed-off-by: Pravin B Shelar <pshe...@nicira.com>

Bug #11933
---
 datapath/datapath.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 605253d..7fb0cef 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -410,8 +410,10 @@ static int queue_gso_packets(struct net *net, int 
dp_ifindex,
        int err;
 
        segs = skb_gso_segment(skb, NETIF_F_SG | NETIF_F_HW_CSUM);
-       if (IS_ERR(skb))
-               return PTR_ERR(skb);
+       if (IS_ERR(segs))
+               return PTR_ERR(segs);
+
+       BUG_ON(!segs);
 
        /* Queue all of the segments. */
        skb = segs;
-- 
1.7.10

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to