summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorGaurav Singh <gaurav1086@gmail.com>2020-06-18 16:36:31 -0400
committerDavid S. Miller <davem@davemloft.net>2020-06-20 17:29:52 -0700
commit8eaf8d99409009b7ab7853f3ac603928458c2022 (patch)
tree6c1a29ca37407b2005a1cb6ec89cef5127cec33d /net/sched
parentcd3998385712dc4ee67d927a51d829d74a104426 (diff)
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')
-rw-r--r--net/sched/sch_api.c3
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)