Skip to content

Commit

Permalink
netevent: remove automatic variable in register_netevent_notifier()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wang Long authored and David S. Miller committed May 31, 2015
1 parent 583d3f5 commit 282c320
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/core/netevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 282c320

Please sign in to comment.