diff mbox series

[-next] netfilter: nftables: remove unnecessary spin_lock_init()

Message ID 20210329135541.3304940-1-yangyingliang@huawei.com
State New
Headers show
Series [-next] netfilter: nftables: remove unnecessary spin_lock_init() | expand

Commit Message

Yang Yingliang March 29, 2021, 1:55 p.m. UTC
The spinlock nf_tables_destroy_list_lock is initialized statically.
It is unnecessary to initialize by spin_lock_init().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 net/netfilter/nf_tables_api.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Pablo Neira Ayuso March 30, 2021, 10:54 p.m. UTC | #1
On Mon, Mar 29, 2021 at 09:55:41PM +0800, Yang Yingliang wrote:
> The spinlock nf_tables_destroy_list_lock is initialized statically.

> It is unnecessary to initialize by spin_lock_init().


Applied, thanks.
diff mbox series

Patch

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index fc2526b8bd55..24eeb027a888 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -9193,7 +9193,6 @@  static int __init nf_tables_module_init(void)
 {
 	int err;
 
-	spin_lock_init(&nf_tables_destroy_list_lock);
 	err = register_pernet_subsys(&nf_tables_net_ops);
 	if (err < 0)
 		return err;