diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-06-01 23:07:14 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-02 00:34:56 +0300 |
commit | 5470979585d81271d4338c2accfd5e71dafa4af6 (patch) | |
tree | 44732fbb5e9b8b1d28f935f8e0eba01762640f2f /net/dsa/tag_mtk.c | |
parent | 717ffbfb28ac2b53d3140b2a7dfd345e1569b3a5 (diff) | |
download | linux-5470979585d81271d4338c2accfd5e71dafa4af6.tar.xz |
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_mtk.c')
-rw-r--r-- | net/dsa/tag_mtk.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/dsa/tag_mtk.c b/net/dsa/tag_mtk.c index d1258e84cd71..4b4aaf1574aa 100644 --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c @@ -57,7 +57,7 @@ static struct sk_buff *mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev, __be16 *phdr, hdr; if (unlikely(!pskb_may_pull(skb, MTK_HDR_LEN))) - goto out_drop; + return NULL; /* The MTK header is added by the switch between src addr * and ethertype at this point, skb->data points to 2 bytes @@ -79,19 +79,16 @@ static struct sk_buff *mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev, */ ds = dst->ds[0]; if (!ds) - goto out_drop; + return NULL; /* Get source port information */ port = (hdr & MTK_HDR_RECV_SOURCE_PORT_MASK); if (!ds->ports[port].netdev) - goto out_drop; + return NULL; skb->dev = ds->ports[port].netdev; return skb; - -out_drop: - return NULL; } const struct dsa_device_ops mtk_netdev_ops = { |