net: dsa: Do not check for NULL dst in tag parsers
dsa_switch_rcv() already tests for dst == NULL, so there is no need to duplicate the same check within the tag receive functions. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7f564528a4
commit
9d7f9c4f78
|
@ -100,9 +100,6 @@ static int brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,
|
|||
int source_port;
|
||||
u8 *brcm_tag;
|
||||
|
||||
if (unlikely(dst == NULL))
|
||||
goto out_drop;
|
||||
|
||||
ds = dst->cpu_switch;
|
||||
|
||||
skb = skb_unshare(skb, GFP_ATOMIC);
|
||||
|
|
|
@ -77,9 +77,6 @@ static int dsa_rcv(struct sk_buff *skb, struct net_device *dev,
|
|||
int source_device;
|
||||
int source_port;
|
||||
|
||||
if (unlikely(dst == NULL))
|
||||
goto out_drop;
|
||||
|
||||
skb = skb_unshare(skb, GFP_ATOMIC);
|
||||
if (skb == NULL)
|
||||
goto out;
|
||||
|
|
|
@ -90,9 +90,6 @@ static int edsa_rcv(struct sk_buff *skb, struct net_device *dev,
|
|||
int source_device;
|
||||
int source_port;
|
||||
|
||||
if (unlikely(dst == NULL))
|
||||
goto out_drop;
|
||||
|
||||
skb = skb_unshare(skb, GFP_ATOMIC);
|
||||
if (skb == NULL)
|
||||
goto out;
|
||||
|
|
|
@ -55,9 +55,6 @@ static int mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev,
|
|||
int port;
|
||||
__be16 *phdr, hdr;
|
||||
|
||||
if (unlikely(!dst))
|
||||
goto out_drop;
|
||||
|
||||
skb = skb_unshare(skb, GFP_ATOMIC);
|
||||
if (!skb)
|
||||
goto out;
|
||||
|
|
|
@ -75,9 +75,6 @@ static int qca_tag_rcv(struct sk_buff *skb, struct net_device *dev,
|
|||
int port;
|
||||
__be16 *phdr, hdr;
|
||||
|
||||
if (unlikely(!dst))
|
||||
goto out_drop;
|
||||
|
||||
skb = skb_unshare(skb, GFP_ATOMIC);
|
||||
if (!skb)
|
||||
goto out;
|
||||
|
|
|
@ -66,8 +66,6 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev,
|
|||
u8 *trailer;
|
||||
int source_port;
|
||||
|
||||
if (unlikely(dst == NULL))
|
||||
goto out_drop;
|
||||
ds = dst->cpu_switch;
|
||||
|
||||
skb = skb_unshare(skb, GFP_ATOMIC);
|
||||
|
|
Loading…
Reference in a new issue