staging: comedi: serial2002: use proper errno
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 17 Aug 2015 20:18:43 +0000 (13:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:18 +0000 (18:24 -0700)
checkpatch.pl reports:
WARNING: ENOSYS means 'invalid syscall nr' and nothing else

Change the error code to -ENOTTY.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/serial2002.c

index c6f985504a80977944b2784b116a7b5d3be9561e..7a1defcf210233e7c2d7a03ca290caddb5cc96ed 100644 (file)
@@ -101,7 +101,7 @@ static long serial2002_tty_ioctl(struct file *f, unsigned op,
        if (f->f_op->unlocked_ioctl)
                return f->f_op->unlocked_ioctl(f, op, param);
 
-       return -ENOSYS;
+       return -ENOTTY;
 }
 
 static int serial2002_tty_write(struct file *f, unsigned char *buf, int count)