Thread (3 messages) 3 messages, 3 authors, 1d ago
WARM1d

[PATCH] lsm: remove redundant NULL check in security_init()

From: Sang-Heon Jeon <hidden>
Date: 2026-09-28 17:06:45
Subsystem: security subsystem, the rest · Maintainers: Paul Moore, James Morris, "Serge E. Hallyn", Linus Torvalds

Since commit 5137e583ba26 ("lsm: cleanup the debug and console output
in lsm_init.c"), the NULL check for lsm_order_legacy in security_init()
has no effect.

So remove the check.

No functional change.

Signed-off-by: Sang-Heon Jeon <redacted>
---
 security/lsm_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/security/lsm_init.c b/security/lsm_init.c
index dbda7771013b..8d5ecea99c46 100644
--- a/security/lsm_init.c
+++ b/security/lsm_init.c
@@ -431,8 +431,7 @@ int __init security_init(void)
 	}
 
 	if (lsm_order_cmdline) {
-		if (lsm_order_legacy)
-			lsm_order_legacy = NULL;
+		lsm_order_legacy = NULL;
 		lsm_order_parse(lsm_order_cmdline, "cmdline");
 	} else
 		lsm_order_parse(lsm_order_builtin, "builtin");
base-commit: 63b4c8561b436e8950409d6041fce43f12936f59
-- 
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help