]> Pileus Git - ~andy/linux/blobdiff - fs/fcntl.c
file->f_op is never NULL...
[~andy/linux] / fs / fcntl.c
index 65343c3741ff86876418deb9d18e3f72f5872898..ef6866592a0f68c390f2ecededd785fb21e4a659 100644 (file)
@@ -56,7 +56,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
                                return -EINVAL;
        }
 
-       if (filp->f_op && filp->f_op->check_flags)
+       if (filp->f_op->check_flags)
                error = filp->f_op->check_flags(arg);
        if (error)
                return error;
@@ -64,8 +64,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
        /*
         * ->fasync() is responsible for setting the FASYNC bit.
         */
-       if (((arg ^ filp->f_flags) & FASYNC) && filp->f_op &&
-                       filp->f_op->fasync) {
+       if (((arg ^ filp->f_flags) & FASYNC) && filp->f_op->fasync) {
                error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
                if (error < 0)
                        goto out;