Skip to content

Commit 4ecd993

Browse files
pevikMimi Zohar
authored andcommitted
ima: Remove unused variable ima_initialized
Commit a756024 ("ima: added ima_policy_flag variable") replaced ima_initialized with ima_policy_flag, but didn't remove ima_initialized. This patch removes it. Signed-off-by: Petr Vorel <[email protected]> Reviewed-by: James Morris <[email protected]> Signed-off-by: Mimi Zohar <[email protected]>
1 parent de63676 commit 4ecd993

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

security/integrity/ima/ima.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ enum tpm_pcrs { TPM_PCR0 = 0, TPM_PCR8 = 8 };
5353
extern int ima_policy_flag;
5454

5555
/* set during initialization */
56-
extern int ima_initialized;
5756
extern int ima_used_chip;
5857
extern int ima_hash_algo;
5958
extern int ima_appraise;

security/integrity/ima/ima_main.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232

3333
#include "ima.h"
3434

35-
int ima_initialized;
36-
3735
#ifdef CONFIG_IMA_APPRAISE
3836
int ima_appraise = IMA_APPRAISE_ENFORCE;
3937
#else
@@ -517,10 +515,9 @@ static int __init init_ima(void)
517515
error = ima_init();
518516
}
519517

520-
if (!error) {
521-
ima_initialized = 1;
518+
if (!error)
522519
ima_update_policy_flag();
523-
}
520+
524521
return error;
525522
}
526523

0 commit comments

Comments
 (0)