summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2013-12-17 15:29:16 +0800
committerDavid S. Miller <davem@davemloft.net>2013-12-19 15:06:55 -0500
commit3b69a4c9becde783cd89758075780f9d871ba4b6 (patch)
tree550702526757e4fee010f8cd447c82db5ac5868a /net/sched
parentd2adcaa82d0c9d6423afcbfcb68658ff86794c29 (diff)
downloadop-kernel-dev-3b69a4c9becde783cd89758075780f9d871ba4b6.zip
op-kernel-dev-3b69a4c9becde783cd89758075780f9d871ba4b6.tar.gz
act_police: 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')
-rw-r--r--net/sched/act_police.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 0cc305e..7b23ab0 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -261,10 +261,8 @@ override:
failure_unlock:
spin_unlock_bh(&police->tcf_lock);
failure:
- if (P_tab)
- qdisc_put_rtab(P_tab);
- if (R_tab)
- qdisc_put_rtab(R_tab);
+ qdisc_put_rtab(P_tab);
+ qdisc_put_rtab(R_tab);
if (ret == ACT_P_CREATED)
kfree(police);
return err;
OpenPOWER on IntegriCloud