lsm: remove redundant NULL check in security_init()
PATCH 1/1 lsm: remove redundant NULL check in security_init()
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.
--- security/lsm_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
security/lsm_init.c +1 -2
@@ -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
Signature · 1 line
2.43.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 9 lines
Since commit
5137e583ba26("lsm: cleanup the debug and console output inlsm_init.c"), the NULL check forlsm_order_legacyinsecurity_init()has no effect.So remove the check.
No functional change.
Signed-off-by Sang-Heon Jeon <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 5 lines · On Sep 28, 2026 Sang-Heon Jeon <[email protected]> wrote:
Since commit
5137e583ba26("lsm: cleanup the debug and console output inlsm_init.c"), the NULL check forlsm_order_legacyinsecurity_init()has no effect.
Quoted 8 lines
So remove the check.
No functional change.
Signed-off-by Sang-Heon Jeon <[email protected]>--- security/lsm_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Merged into lsm/dev, thanks.
--
paul-moore.com