net: hns3: remove redundant assignment of l2_hdr to itself
authorColin Ian King <colin.king@canonical.com>
Wed, 8 May 2019 10:51:35 +0000 (11:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 May 2019 16:44:37 +0000 (09:44 -0700)
The pointer l2_hdr is being assigned to itself, this is redundant
and can be removed.

Addresses-Coverity: ("Evaluation order violation")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

index 18711e0f9bdf6cb79087b4fd1e6b480a2e8fde4f..196a3d780dcf16fed3cb8efffb4daa9fdbdba314 100644 (file)
@@ -810,7 +810,7 @@ static int hns3_set_l2l3l4(struct sk_buff *skb, u8 ol4_proto,
                           u8 il4_proto, u32 *type_cs_vlan_tso,
                           u32 *ol_type_vlan_len_msec)
 {
-       unsigned char *l2_hdr = l2_hdr = skb->data;
+       unsigned char *l2_hdr = skb->data;
        u32 l4_proto = ol4_proto;
        union l4_hdr_info l4;
        union l3_hdr_info l3;