Staging: comedi: Don't check for -ENOIOCTLCMD
authorShawn Bohrer <shawn.bohrer@gmail.com>
Sun, 18 Oct 2009 20:32:17 +0000 (15:32 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 20:23:01 +0000 (12:23 -0800)
unlocked_ioctl() never returns -ENOIOCTLCMD so remove the check.

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/comedi_compat32.c

index 47cf0a1..a9fdcda 100644 (file)
@@ -97,12 +97,9 @@ static int translated_ioctl(struct file *file, unsigned int cmd,
        if (!file->f_op)
                return -ENOTTY;
 
-       if (file->f_op->unlocked_ioctl) {
-               int rc = (int)(*file->f_op->unlocked_ioctl) (file, cmd, arg);
-               if (rc == -ENOIOCTLCMD)
-                       rc = -ENOTTY;
-               return rc;
-       }
+       if (file->f_op->unlocked_ioctl)
+               return file->f_op->unlocked_ioctl(file, cmd, arg);
+
        return -ENOTTY;
 }