From: Dmitry Kasatkin Date: Mon, 25 Jun 2012 09:18:11 +0000 (+0300) Subject: ima: ima_initialized is set only if successful X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7ff2267af595e642f1009198ab49e86a239148fa;p=linux-beck.git ima: ima_initialized is set only if successful Set ima_initialized only if initialization was successful. Signed-off-by: Dmitry Kasatkin Signed-off-by: Mimi Zohar --- diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 5b0548d75561..be8294915cf7 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; }