netfilter: nftables: remove unnecessary spin_lock_init()
Subsystems (3)
PATCH 1/1 netfilter: nftables: remove unnecessary spin_lock_init()
The spinlock nf_tables_destroy_list_lock is initialized statically. It is unnecessary to initialize by spin_lock_init().
Reported-by Hulk Robot <[email protected]>
Signed-off-by Yang Yingliang <[email protected]>
--- net/netfilter/nf_tables_api.c | 1 - 1 file changed, 1 deletion(-)
net/netfilter/nf_tables_api.c +0 -1
@@ -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;
Signature · 1 line
2.25.1
Quoted 2 lines · Yang Yingliang
The spinlock
nf_tables_destroy_list_lockis initialized statically. It is unnecessary to initialize byspin_lock_init().
Applied, thanks.