summaryrefslogtreecommitdiffstats
path: root/net/sched/act_police.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2013-12-17 08:29:16 +0100
committerDavid S. Miller <davem@davemloft.net>2013-12-19 21:06:55 +0100
commit3b69a4c9becde783cd89758075780f9d871ba4b6 (patch)
tree550702526757e4fee010f8cd447c82db5ac5868a /net/sched/act_police.c
parentsfc: fix sparse non static symbol warning (diff)
downloadlinux-3b69a4c9becde783cd89758075780f9d871ba4b6.tar.xz
linux-3b69a4c9becde783cd89758075780f9d871ba4b6.zip
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/act_police.c')
-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 0cc305e7e469..7b23ab07c6cc 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;