diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-07-07 04:23:09 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-07-09 00:02:08 -0400 |
| commit | 09a7636a5b151670072de60767ddf096dc7bd12e (patch) | |
| tree | d2d45014c900047bb8c24c73a90815329b6f689d | |
| parent | 606274c5abd8e245add01bc7145a8cbb92b69ba8 (diff) | |
bnxt: fix a condition
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>
| -rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 70b148a10ec8..659faa6511c0 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c | |||
| @@ -997,7 +997,7 @@ static struct sk_buff *bnxt_gro_func_5731x(struct bnxt_tpa_info *tpa_info, | |||
| 997 | * correct protocol ID, it must be a loopback packet where | 997 | * correct protocol ID, it must be a loopback packet where |
| 998 | * the offsets are off by 4. | 998 | * the offsets are off by 4. |
| 999 | */ | 999 | */ |
| 1000 | if (proto != htons(ETH_P_IP) && proto && htons(ETH_P_IPV6)) | 1000 | if (proto != htons(ETH_P_IP) && proto != htons(ETH_P_IPV6)) |
| 1001 | loopback = true; | 1001 | loopback = true; |
| 1002 | } | 1002 | } |
| 1003 | if (loopback) { | 1003 | if (loopback) { |
