diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2020-07-30 13:02:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-01 01:42:30 +0200 |
commit | 9fc95f50eedb5cfe5d53a9c970c47ed680fc4e54 (patch) | |
tree | cef4101839415ef7f884dc026097029d713ee6e3 /net/core/dev.c | |
parent | bluetooth: sco: Fix sockptr reference. (diff) | |
download | linux-9fc95f50eedb5cfe5d53a9c970c47ed680fc4e54.tar.xz linux-9fc95f50eedb5cfe5d53a9c970c47ed680fc4e54.zip |
net: Pass NULL to skb_network_protocol() when we don't care about vlan depth
When we don't care about vlan depth, we could pass NULL instead of the
address of a unused local variable to skb_network_protocol() as a param.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/core/dev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index fe2e387eed29..38a6371d9bc5 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3454,10 +3454,9 @@ static netdev_features_t net_mpls_features(struct sk_buff *skb, static netdev_features_t harmonize_features(struct sk_buff *skb, netdev_features_t features) { - int tmp; __be16 type; - type = skb_network_protocol(skb, &tmp); + type = skb_network_protocol(skb, NULL); features = net_mpls_features(skb, features, type); if (skb->ip_summed != CHECKSUM_NONE && |