Commit 282c320d authored by Wang Long's avatar Wang Long Committed by David S. Miller

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: default avatarWang Long <long.wanglong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 583d3f5a
...@@ -31,10 +31,7 @@ static ATOMIC_NOTIFIER_HEAD(netevent_notif_chain); ...@@ -31,10 +31,7 @@ static ATOMIC_NOTIFIER_HEAD(netevent_notif_chain);
*/ */
int register_netevent_notifier(struct notifier_block *nb) int register_netevent_notifier(struct notifier_block *nb)
{ {
int err; return atomic_notifier_chain_register(&netevent_notif_chain, nb);
err = atomic_notifier_chain_register(&netevent_notif_chain, nb);
return err;
} }
EXPORT_SYMBOL_GPL(register_netevent_notifier); EXPORT_SYMBOL_GPL(register_netevent_notifier);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment