From: Yang Yingliang <yangyingliang@huawei.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: [PATCH net-next 1/2] act_police: remove unnecessary null pointer check
Date: Tue, 17 Dec 2013 15:29:16 +0800 [thread overview]
Message-ID: <1387265357-19352-2-git-send-email-yangyingliang@huawei.com> (raw)
In-Reply-To: <1387265357-19352-1-git-send-email-yangyingliang@huawei.com>
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>
---
net/sched/act_police.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 16a62c3..cf01c97 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -277,10 +277,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;
--
1.8.0
next prev parent reply other threads:[~2013-12-17 7:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 7:29 [PATCH net-next 0/2] net_sched: remove unnecessary null pointer check Yang Yingliang
2013-12-17 7:29 ` Yang Yingliang [this message]
2013-12-17 7:29 ` [PATCH net-next 2/2] sch_cbq: " Yang Yingliang
2013-12-19 20:07 ` [PATCH net-next 0/2] net_sched: " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387265357-19352-2-git-send-email-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).