Linux Security Modules development
 help / color / mirror / Atom feed
* [PATCH] lsm: remove redundant NULL check in security_init()
@ 2026-09-28 17:06 Sang-Heon Jeon
  2026-09-28 17:09 ` sashiko-bot
  2026-09-30  1:47 ` Paul Moore
  0 siblings, 2 replies; 3+ messages in thread
From: Sang-Heon Jeon @ 2026-09-28 17:06 UTC (permalink / raw)
  To: James Morris, Paul Moore, Serge E. Hallyn; +Cc: linux-security-module

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 <ekffu200098@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-30  1:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28 17:06 [PATCH] lsm: remove redundant NULL check in security_init() Sang-Heon Jeon
2026-09-28 17:09 ` sashiko-bot
2026-09-30  1:47 ` Paul Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox