linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] netevent: remove automatic variable in register_netevent_notifier()
@ 2015-05-29  1:02 Wang Long
  2015-05-31  7:07 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Long @ 2015-05-29  1:02 UTC (permalink / raw)
  To: davem, netdev, sergei.shtylyov
  Cc: long.wanglong, linux-kernel, peifeiyue, wanglong

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] netevent: remove automatic variable in register_netevent_notifier()
  2015-05-29  1:02 [PATCH v2] netevent: remove automatic variable in register_netevent_notifier() Wang Long
@ 2015-05-31  7:07 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-05-31  7:07 UTC (permalink / raw)
  To: long.wanglong; +Cc: netdev, sergei.shtylyov, linux-kernel, peifeiyue, wanglong

From: Wang Long <long.wanglong@huawei.com>
Date: Fri, 29 May 2015 01:02:08 +0000

> 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>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-31  7:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-29  1:02 [PATCH v2] netevent: remove automatic variable in register_netevent_notifier() Wang Long
2015-05-31  7:07 ` David Miller

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).