From: Shawn Bohrer Date: Sun, 18 Oct 2009 20:32:17 +0000 (-0500) Subject: Staging: comedi: Don't check for -ENOIOCTLCMD X-Git-Tag: v2.6.33-rc2~13^2~198 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6279bc9e4dfb30bef8e3e1f41df8e877ecd3e30;p=profile%2Fivi%2Fkernel-x86-ivi.git Staging: comedi: Don't check for -ENOIOCTLCMD unlocked_ioctl() never returns -ENOIOCTLCMD so remove the check. Signed-off-by: Shawn Bohrer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c index 47cf0a1..a9fdcda 100644 --- a/drivers/staging/comedi/comedi_compat32.c +++ b/drivers/staging/comedi/comedi_compat32.c @@ -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; }