Skip to content

Commit

Permalink
net: remove empty inet_exit_net
Browse files Browse the repository at this point in the history
Pointer members of an object with static storage duration, if not
explicitly initialized, will be initialized to a NULL pointer. The
net namespace API checks if this pointer is not NULL before using it,
it are safe to remove the function.

Signed-off-by: Li RongQing <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lrq-max authored and davem330 committed Aug 20, 2019
1 parent 196640a commit af80970
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1845,13 +1845,8 @@ static __net_init int inet_init_net(struct net *net)
return 0;
}

static __net_exit void inet_exit_net(struct net *net)
{
}

static __net_initdata struct pernet_operations af_inet_ops = {
.init = inet_init_net,
.exit = inet_exit_net,
};

static int __init init_inet_pernet_ops(void)
Expand Down

0 comments on commit af80970

Please sign in to comment.