net: sched: cls_api: fix dead code in switch
Subsystems (3)
PATCH 1/1 net: sched: cls_api: fix dead code in switch
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")
--- net/sched/cls_api.c | 1 - 1 file changed, 1 deletion(-)
net/sched/cls_api.c +0 -1
@@ -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 )
Signature · 1 line
2.7.4
Quoted 7 lines · Wed, Jul 25, 2018 at 04:07:24PM CEST, [email protected] wrote:
Code at line 1850 is unreachable. Fix this by removing the break statement above it, so the code for case
RTM_GETCHAINcan 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 <[email protected]>
I'm just writing a selftest to test this path. Thanks.
From: "Gustavo A. R. Silva" <[email protected]>
Date: Wed, 25 Jul 2018 09:07:24 -0500
Quoted 7 lines
Code at line 1850 is unreachable. Fix this by removing the break statement above it, so the code for case
RTM_GETCHAINcan 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 <[email protected]>
Applied, thanks.
Please use "[PATCH net-next] ..." in your subject lines to indirect the tree that this change is relevant for and targetted to.
Thank you.
Quoted 7 lines · David Miller
From: "Gustavo A. R. Silva" <[email protected]>
Date: Wed, 25 Jul 2018 09:07:24 -0500Quoted 4 lines
Code at line 1850 is unreachable. Fix this by removing the break statement above it, so the code for case
RTM_GETCHAINcan be properly executed.
Quoted 9 lines
Quoted 3 lines
Addresses-Coverity-ID: 1472050 ("Structurally dead code")
Fixes 32a4f5ecd738 ("net: sched: introduce chain object to uapi")Signed-off-by Gustavo A. R. Silva <[email protected]>Applied, thanks.
Please use "[PATCH net-next] ..." in your subject lines to indirect the tree that this change is relevant for and targetted to.
Got it. Will do next time.
Thanks
--
Gustavo