Remove redundant condition in qdisc_graft
authorGaurav Singh <gaurav1086@gmail.com>
Thu, 18 Jun 2020 20:36:31 +0000 (16:36 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Jun 2020 00:29:52 +0000 (17:29 -0700)
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>
net/sched/sch_api.c

index 9a3449b..11ebba6 100644 (file)
@@ -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)