Merge branch 'akpm' (fixes from Andrew)
[linux-drm-fsl-dcu.git] / fs / compat_ioctl.c
index 5d19acfa7c6c652a6b8134ec79507457be463216..dc52e13d58e021ac5cf7951d44c66c8e8d9a4993 100644 (file)
@@ -1583,13 +1583,13 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
                /*FALL THROUGH*/
 
        default:
-               if (f.file->f_op && f.file->f_op->compat_ioctl) {
+               if (f.file->f_op->compat_ioctl) {
                        error = f.file->f_op->compat_ioctl(f.file, cmd, arg);
                        if (error != -ENOIOCTLCMD)
                                goto out_fput;
                }
 
-               if (!f.file->f_op || !f.file->f_op->unlocked_ioctl)
+               if (!f.file->f_op->unlocked_ioctl)
                        goto do_ioctl;
                break;
        }