diff mbox series

[net-next] net: remove empty inet_exit_net

Message ID 1566216315-18506-1-git-send-email-lirongqing@baidu.com
State Accepted
Delegated to: David Miller
Headers show
Series [net-next] net: remove empty inet_exit_net | expand

Commit Message

Li RongQing Aug. 19, 2019, 12:05 p.m. UTC
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 <lirongqing@baidu.com>
---
 net/ipv4/af_inet.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

David Miller Aug. 20, 2019, 1:23 a.m. UTC | #1
From: Li RongQing <lirongqing@baidu.com>
Date: Mon, 19 Aug 2019 20:05:15 +0800

> 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 <lirongqing@baidu.com>

Applied.
diff mbox series

Patch

diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index ed2301ef872e..70f92aaca411 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -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)