]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: sched: cls_api: fix dead code in switch
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 25 Jul 2018 14:07:24 +0000 (09:07 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Jul 2018 21:09:27 +0000 (14:09 -0700)
Code at line 1850 is unreachable. Fix this by removing the break
statement above it, so the code for case RTM_GETCHAIN can be
properly executed.

Addresses-Coverity-ID: 1472050 ("Structurally dead code")
Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c

index 5f7098b5405e45a1d93b9c0086cafead98edd57a..f3d78c23338e7cf4cbb59f3471ca7e3ef6efd60f 100644 (file)
@@ -1846,7 +1846,6 @@ static int tc_ctl_chain(struct sk_buff *skb, struct nlmsghdr *n,
                tcf_chain_put_explicitly_created(chain);
                break;
        case RTM_GETCHAIN:
-               break;
                err = tc_chain_notify(chain, skb, n->nlmsg_seq,
                                      n->nlmsg_seq, n->nlmsg_type, true);
                if (err < 0)