Commit 3b69a4c9 authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller

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: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d2adcaa8
......@@ -261,9 +261,7 @@ static int tcf_act_police_locate(struct net *net, struct nlattr *nla,
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);
if (ret == ACT_P_CREATED)
kfree(police);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment