summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_cbq.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2013-12-17 15:29:17 +0800
committerDavid S. Miller <davem@davemloft.net>2013-12-19 15:06:55 -0500
commit79c11f2e3fd3e0e3594d4155821ef426153a773f (patch)
treea480220039767c512ff141c956b4b6f31d45076f /net/sched/sch_cbq.c
parent3b69a4c9becde783cd89758075780f9d871ba4b6 (diff)
sch_cbq: remove unnecessary null pointer check
It already has a NULL pointer check of rtab in qdisc_put_rtab(). Remove the check outside of qdisc_put_rtab(). Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r--net/sched/sch_cbq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index d5a8a4b2454..e2518333380 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1783,8 +1783,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t
qdisc_root_sleeping_lock(sch),
tca[TCA_RATE]);
if (err) {
- if (rtab)
- qdisc_put_rtab(rtab);
+ qdisc_put_rtab(rtab);
return err;
}
}