From: Yang Yingliang Date: Tue, 17 Dec 2013 07:29:16 +0000 (+0800) Subject: act_police: remove unnecessary null pointer check X-Git-Tag: accepted/tizen/common/20141203.182822~719^2~433 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b69a4c9becde783cd89758075780f9d871ba4b6;p=platform%2Fkernel%2Flinux-arm64.git 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 Signed-off-by: David S. Miller --- 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;