Commit a6279bc9 authored by Shawn Bohrer's avatar Shawn Bohrer Committed by Greg Kroah-Hartman

Staging: comedi: Don't check for -ENOIOCTLCMD

unlocked_ioctl() never returns -ENOIOCTLCMD so remove the check.
Signed-off-by: default avatarShawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5d7ae225
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment