* [PATCH -next] ima: Use if/else statement in init_ima()
@ 2022-06-09 13:58 Xiu Jianfeng
0 siblings, 0 replies; only message in thread
From: Xiu Jianfeng @ 2022-06-09 13:58 UTC (permalink / raw)
To: zohar, dmitry.kasatkin, jmorris, serge
Cc: linux-integrity, linux-security-module, linux-kernel
Cleanup in init_ima(), replace if(cond)/if(!cond) statement with
if/else statement.
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
---
security/integrity/ima/ima_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 040b03ddc1c7..e1edc83fca51 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -1068,8 +1068,7 @@ static int __init init_ima(void)
error = register_blocking_lsm_notifier(&ima_lsm_policy_notifier);
if (error)
pr_warn("Couldn't register LSM notifier, error %d\n", error);
-
- if (!error)
+ else
ima_update_policy_flags();
return error;
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-09 14:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 13:58 [PATCH -next] ima: Use if/else statement in init_ima() Xiu Jianfeng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.