summaryrefslogtreecommitdiff
path: root/net/core/netevent.c
diff options
context:
space:
mode:
authorWang Long <long.wanglong@huawei.com>2015-05-29 04:02:08 +0300
committerDavid S. Miller <davem@davemloft.net>2015-05-31 10:03:21 +0300
commit282c320d33541d61f4ab91248448040c4ebab1fc (patch)
tree7881fb7b472f19398e2f9407906b89df8a2e5c60 /net/core/netevent.c
parent583d3f5af2a6dfa7866715d9e062dbfb3b66a6f0 (diff)
downloadlinux-282c320d33541d61f4ab91248448040c4ebab1fc.tar.xz
netevent: remove automatic variable in register_netevent_notifier()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/netevent.c')
-rw-r--r--net/core/netevent.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/core/netevent.c b/net/core/netevent.c
index f17ccd291d39..8b3bc4fac613 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);