summaryrefslogtreecommitdiff
path: root/net/dsa/tag_brcm.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-04-08 08:55:22 -0700
committerDavid S. Miller <davem@davemloft.net>2017-04-08 13:49:36 -0700
commit16c5dcb13a371feae0e680e6518775b5335b37d8 (patch)
tree2dd0fe414dc67bcef0da6c4e2a19178650145fe3 /net/dsa/tag_brcm.c
parent9d7f9c4f78e95dd9d17199a53d903262530be62e (diff)
net: dsa: Move skb_unshare() to dsa_switch_rcv()
All DSA tag receive functions need to unshare the skb before mangling it, move this to the generic dsa_switch_rcv() function which will allow us to make the tag receive function return their mangled skb without caring about freeing a NULL skb. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/tag_brcm.c')
-rw-r--r--net/dsa/tag_brcm.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/dsa/tag_brcm.c b/net/dsa/tag_brcm.c
index 68d4feef96d4..263941769c88 100644
--- a/net/dsa/tag_brcm.c
+++ b/net/dsa/tag_brcm.c
@@ -102,10 +102,6 @@ static int brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,
ds = dst->cpu_switch;
- skb = skb_unshare(skb, GFP_ATOMIC);
- if (skb == NULL)
- goto out;
-
if (unlikely(!pskb_may_pull(skb, BRCM_TAG_LEN)))
goto out_drop;
@@ -151,7 +147,6 @@ static int brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,
out_drop:
kfree_skb(skb);
-out:
return 0;
}