Skip to content

Commit 29d1c2b

Browse files
ColinIanKingmimizohar
authored andcommitted
ima: remove redundant initialization of pointer 'file'.
The pointer 'file' is being initialized with a value that is never read, it is being re-assigned the same value later on closer to where it is being first used. The initialization is redundant and can be removed. Cleans up clang scan build warning: security/integrity/ima/ima_main.c:434:15: warning: Value stored to 'file' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
1 parent 3123109 commit 29d1c2b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

security/integrity/ima/ima_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int ima_file_mmap(struct file *file, unsigned long prot)
432432
int ima_file_mprotect(struct vm_area_struct *vma, unsigned long prot)
433433
{
434434
struct ima_template_desc *template = NULL;
435-
struct file *file = vma->vm_file;
435+
struct file *file;
436436
char filename[NAME_MAX];
437437
char *pathbuf = NULL;
438438
const char *pathname = NULL;

0 commit comments

Comments
 (0)