]> Pileus Git - ~andy/linux/blobdiff - fs/binfmt_elf.c
file->f_op is never NULL...
[~andy/linux] / fs / binfmt_elf.c
index 4c94a79991bb6d8ae0d2e12ae8c647e2fe22f7fe..501c8a4d6eb1cb1bb3753da7f3aa0ae41a0ef36a 100644 (file)
@@ -406,7 +406,7 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
                goto out;
        if (!elf_check_arch(interp_elf_ex))
                goto out;
-       if (!interpreter->f_op || !interpreter->f_op->mmap)
+       if (!interpreter->f_op->mmap)
                goto out;
 
        /*
@@ -607,7 +607,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
                goto out;
        if (!elf_check_arch(&loc->elf_ex))
                goto out;
-       if (!bprm->file->f_op || !bprm->file->f_op->mmap)
+       if (!bprm->file->f_op->mmap)
                goto out;
 
        /* Now read in all of the header information */
@@ -1028,7 +1028,7 @@ static int load_elf_library(struct file *file)
 
        /* First of all, some simple consistency checks */
        if (elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 ||
-           !elf_check_arch(&elf_ex) || !file->f_op || !file->f_op->mmap)
+           !elf_check_arch(&elf_ex) || !file->f_op->mmap)
                goto out;
 
        /* Now read in all of the header information */