netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wang Long <long.wanglong@huawei.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<sergei.shtylyov@cogentembedded.com>
Cc: <long.wanglong@huawei.com>, <linux-kernel@vger.kernel.org>,
	<peifeiyue@huawei.com>, <wanglong@laoqinren.net>
Subject: [PATCH v2] netevent: remove automatic variable in register_netevent_notifier()
Date: Fri, 29 May 2015 01:02:08 +0000	[thread overview]
Message-ID: <1432861328-227197-1-git-send-email-long.wanglong@huawei.com> (raw)

Remove automatic variable 'err' in register_netevent_notifier() and
return the result of atomic_notifier_chain_register() directly.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
---
 net/core/netevent.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/core/netevent.c b/net/core/netevent.c
index f17ccd2..8b3bc4f 100644
--- a/net/core/netevent.c
+++ b/net/core/netevent.c
@@ -31,10 +31,7 @@ static ATOMIC_NOTIFIER_HEAD(netevent_notif_chain);
  */
 int register_netevent_notifier(struct notifier_block *nb)
 {
-	int err;
-
-	err = atomic_notifier_chain_register(&netevent_notif_chain, nb);
-	return err;
+	return atomic_notifier_chain_register(&netevent_notif_chain, nb);
 }
 EXPORT_SYMBOL_GPL(register_netevent_notifier);
 
-- 
1.8.3.4

             reply	other threads:[~2015-05-29  1:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29  1:02 Wang Long [this message]
2015-05-31  7:07 ` [PATCH v2] netevent: remove automatic variable in register_netevent_notifier() 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=1432861328-227197-1-git-send-email-long.wanglong@huawei.com \
    --to=long.wanglong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peifeiyue@huawei.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=wanglong@laoqinren.net \
    /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).