mirror of https://gitee.com/openkylin/linux.git
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:
parent
8445d64dd7
commit
7ff2267af5
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue