]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: dsa: Do not check for NULL dst in tag parsers
authorFlorian Fainelli <f.fainelli@gmail.com>
Sat, 8 Apr 2017 15:55:21 +0000 (08:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Apr 2017 20:49:36 +0000 (13:49 -0700)
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>
net/dsa/tag_brcm.c
net/dsa/tag_dsa.c
net/dsa/tag_edsa.c
net/dsa/tag_mtk.c
net/dsa/tag_qca.c
net/dsa/tag_trailer.c

index e2ed6cf68261f8b655bde8cc8fff4ea240194952..68d4feef96d4f92748e2ac91166f671393ed3148 100644 (file)
@@ -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);
index e42ba906100cbc14beec08fb98f283785c3183e0..377569c0e4f7c307c02ddd793f1a1dbd1f1e6d78 100644 (file)
@@ -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;
index 6a9b7a9e4e15b9d75571f4f4cc18b776e420610b..30520ff9c9a28f7331a1ab40ecfaebb44920609c 100644 (file)
@@ -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;
index 44ae6353a52103bf06a435c46f4302b4b48243bb..836c311a3c386b36fcb33d3ff26cf7dc69cf604b 100644 (file)
@@ -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;
index 4e0dad759d047a3122ab0ed5005a37f1f3fa69da..6579d6db1bc6209a80849124d89880387dd6498b 100644 (file)
@@ -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;
index 74c948512550f71649d62446b0c2e60bd88004f9..f5c764ee29680a9a2ced6087191b008a9a503573 100644 (file)
@@ -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);