ima: ima_initialized is set only if successful

Set ima_initialized only if initialization was successful.

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
This commit is contained in:
Dmitry Kasatkin 2012-06-25 12:18:11 +03:00 committed by Mimi Zohar
parent 8445d64dd7
commit 7ff2267af5

View File

@ -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;
}