Browse Source

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>
Yang Yingliang 11 years ago
parent
commit
3b69a4c9be
1 changed files with 2 additions and 4 deletions
  1. 2 4
      net/sched/act_police.c

+ 2 - 4
net/sched/act_police.c

@@ -261,10 +261,8 @@ override:
 failure_unlock:
 failure_unlock:
 	spin_unlock_bh(&police->tcf_lock);
 	spin_unlock_bh(&police->tcf_lock);
 failure:
 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)
 	if (ret == ACT_P_CREATED)
 		kfree(police);
 		kfree(police);
 	return err;
 	return err;