Skip to content

Commit

Permalink
sch_cbq: remove unnecessary null pointer check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Yingliang authored and David S. Miller committed Dec 19, 2013
1 parent 3b69a4c commit 79c11f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/sched/sch_cbq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 79c11f2

Please sign in to comment.