[ovs-dev] [PATCH] datapath: Check correct return value from skb_gso_segment()
Pravin B Shelar
pshelar at nicira.com
Tue Jun 12 01:13:19 UTC 2012
Fix return check typo.
Signed-off-by: Pravin B Shelar <pshelar at 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
More information about the dev
mailing list