diff options
author | Gaurav Singh <gaurav1086@gmail.com> | 2020-06-18 22:36:31 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-21 02:29:52 +0200 |
commit | 8eaf8d99409009b7ab7853f3ac603928458c2022 (patch) | |
tree | 6c1a29ca37407b2005a1cb6ec89cef5127cec33d /net/sched/sch_api.c | |
parent | Merge branch 'Ocelot-Felix-driver-cleanup' (diff) | |
download | linux-8eaf8d99409009b7ab7853f3ac603928458c2022.tar.xz linux-8eaf8d99409009b7ab7853f3ac603928458c2022.zip |
Remove redundant condition in qdisc_graft
parent cannot be NULL here since its in the else part
of the if (parent == NULL) condition. Remove the extra
check on parent pointer.
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r-- | net/sched/sch_api.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 9a3449b56bd6..11ebba60da3b 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1093,8 +1093,7 @@ skip: int err; /* Only support running class lockless if parent is lockless */ - if (new && (new->flags & TCQ_F_NOLOCK) && - parent && !(parent->flags & TCQ_F_NOLOCK)) + if (new && (new->flags & TCQ_F_NOLOCK) && !(parent->flags & TCQ_F_NOLOCK)) qdisc_clear_nolock(new); if (!cops || !cops->graft) |