]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
netevent: remove automatic variable in register_netevent_notifier()
authorWang Long <long.wanglong@huawei.com>
Fri, 29 May 2015 01:02:08 +0000 (01:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 May 2015 07:03:21 +0000 (00:03 -0700)
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>
net/core/netevent.c

index f17ccd291d3902a94ebd31653959851203402468..8b3bc4fac6136638de97124443fb6452b1d33fc2 100644 (file)
@@ -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);