diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-06-01 16:07:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-01 17:34:56 -0400 |
commit | 5470979585d81271d4338c2accfd5e71dafa4af6 (patch) | |
tree | 44732fbb5e9b8b1d28f935f8e0eba01762640f2f /net/dsa/tag_brcm.c | |
parent | 717ffbfb28ac2b53d3140b2a7dfd345e1569b3a5 (diff) |
net: dsa: remove out_drop label in taggers rcv
Many rcv functions from net/dsa/tag_*.c have a useless out_drop goto
label which simply returns NULL. Kill it in favor of the obvious.
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.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.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/dsa/tag_brcm.c b/net/dsa/tag_brcm.c index 9f204f18ada3..635ecb6781e4 100644 --- a/net/dsa/tag_brcm.c +++ b/net/dsa/tag_brcm.c @@ -104,27 +104,27 @@ static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev, ds = dst->cpu_dp->ds; if (unlikely(!pskb_may_pull(skb, BRCM_TAG_LEN))) - goto out_drop; + return NULL; /* skb->data points to the EtherType, the tag is right before it */ brcm_tag = skb->data - 2; /* The opcode should never be different than 0b000 */ if (unlikely((brcm_tag[0] >> BRCM_OPCODE_SHIFT) & BRCM_OPCODE_MASK)) - goto out_drop; + return NULL; /* We should never see a reserved reason code without knowing how to * handle it */ if (unlikely(brcm_tag[2] & BRCM_EG_RC_RSVD)) - goto out_drop; + return NULL; /* Locate which port this is coming from */ source_port = brcm_tag[3] & BRCM_EG_PID_MASK; /* Validate port against switch setup, either the port is totally */ if (source_port >= ds->num_ports || !ds->ports[source_port].netdev) - goto out_drop; + return NULL; /* Remove Broadcom tag and update checksum */ skb_pull_rcsum(skb, BRCM_TAG_LEN); @@ -137,9 +137,6 @@ static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev, skb->dev = ds->ports[source_port].netdev; return skb; - -out_drop: - return NULL; } const struct dsa_device_ops brcm_netdev_ops = { |