diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 5b0548d75561316315b806389abe9a1cd1a99719..be8294915cf7f65524a21ab2dd3101ecb0a6edd9 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -258,7 +258,8 @@ static int __init init_ima(void) int error; error = ima_init(); - ima_initialized = 1; + if (!error) + ima_initialized = 1; return error; }