On Jun 12, 2012, at 10:13 AM, Pravin B Shelar <pshe...@nicira.com> wrote:

> 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);

I'm not sure that the BUG_ON adds too much value but otherwise this is clearly 
correct.

Acked-by: Jesse Gross <je...@nicira.com>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to