selinux: drop unnecessary goto and label from avc_alloc_node()

Since avc_alloc_node() doesn't need to perform any cleanup on
its exit paths, there is no benefit to keeping the out
label and goto statement. Drop it.

Signed-off-by: Kalevi Kolttonen <kalevi@kolttonen.fi>
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
Kalevi Kolttonen 2026-06-22 23:39:12 +03:00 committed by Paul Moore
parent 64740a0588
commit d3e4784c2b

View File

@ -497,7 +497,7 @@ static struct avc_node *avc_alloc_node(void)
node = kmem_cache_zalloc(avc_node_cachep, GFP_NOWAIT);
if (!node)
goto out;
return NULL;
INIT_HLIST_NODE(&node->list);
avc_cache_stats_incr(allocations);
@ -506,7 +506,6 @@ static struct avc_node *avc_alloc_node(void)
selinux_avc.avc_cache_threshold)
avc_reclaim_node();
out:
return node;
}