diff mbox series

[net-next] net: remove empty netlink_tap_exit_net

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

Commit Message

Li RongQing June 14, 2019, 1:29 a.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/netlink/af_netlink.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

David Miller June 15, 2019, 2:50 a.m. UTC | #1
From: Li RongQing <lirongqing@baidu.com>
Date: Fri, 14 Jun 2019 09:29:09 +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/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 718a97d5f1fd..9a2cd648d9c6 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -245,13 +245,8 @@  static __net_init int netlink_tap_init_net(struct net *net)
 	return 0;
 }
 
-static void __net_exit netlink_tap_exit_net(struct net *net)
-{
-}
-
 static struct pernet_operations netlink_tap_net_ops = {
 	.init = netlink_tap_init_net,
-	.exit = netlink_tap_exit_net,
 	.id   = &netlink_tap_net_id,
 	.size = sizeof(struct netlink_tap_net),
 };