]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnxt: fix a condition
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Jul 2016 08:23:09 +0000 (11:23 +0300)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 17:57:56 +0000 (12:57 -0500)
Orabug: 24567991

This code generates as static checker warning because htons(ETH_P_IPV6)
is always true.  From the context it looks like the && was intended to
be !=.

Fixes: 94758f8de037 ('bnxt_en: Add GRO logic for BCM5731X chips.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 09a7636a5b151670072de60767ddf096dc7bd12e)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index ff13b7ed493fa5583e21c340205bc6c13aa2109c..60e268cb8b8f7fad1efe513f63fd1a07b9da6db2 100644 (file)
@@ -1001,7 +1001,7 @@ static struct sk_buff *bnxt_gro_func_5731x(struct bnxt_tpa_info *tpa_info,
                 * correct protocol ID, it must be a loopback packet where
                 * the offsets are off by 4.
                 */
-               if (proto != htons(ETH_P_IP) && proto && htons(ETH_P_IPV6))
+               if (proto != htons(ETH_P_IP) && proto != htons(ETH_P_IPV6))
                        loopback = true;
        }
        if (loopback) {