summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2020-08-01 12:36:05 +0300
committerDavid S. Miller <davem@davemloft.net>2020-08-04 01:38:31 +0300
commit2f631133c40cd8e311ae393518c3e651e476ab66 (patch)
tree3adc7329dd5c1d2b3f6f21c77dc092d6bb693e6c /net/core
parentc15fc199b3757496325c4855662fad89bd1efdad (diff)
downloadlinux-2f631133c40cd8e311ae393518c3e651e476ab66.tar.xz
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 'net/core')
-rw-r--r--net/core/skbuff.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 97ad6523e490..2828f6d5ba89 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3758,7 +3758,6 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
int err = -ENOMEM;
int i = 0;
int pos;
- int dummy;
if (list_skb && !list_skb->head_frag && skb_headlen(list_skb) &&
(skb_shinfo(head_skb)->gso_type & SKB_GSO_DODGY)) {
@@ -3780,7 +3779,7 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
}
__skb_push(head_skb, doffset);
- proto = skb_network_protocol(head_skb, &dummy);
+ proto = skb_network_protocol(head_skb, NULL);
if (unlikely(!proto))
return ERR_PTR(-EINVAL);