Skip to content

Commit

Permalink
Staging: comedi: Don't check for -ENOIOCTLCMD
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Bohrer authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent 5d7ae22 commit a6279bc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/staging/comedi/comedi_compat32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a6279bc

Please sign in to comment.