[media] -EINVAL -> -ENOTTY
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 8 Feb 2012 11:09:36 +0000 (08:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 20 Mar 2012 01:36:13 +0000 (22:36 -0300)
I found one more place where -EINVAL is used instead of -ENOTTY:

Note that drivers/media/dvb/dvb-core/dvbdev.c has the same code, but as far as
I can tell DVB is still using -EINVAL for unknown ioctls so I didn't change
that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-ioctl.c

index 74cab51..5b2ec1f 100644 (file)
@@ -2455,7 +2455,7 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
        /* Handles IOCTL */
        err = func(file, cmd, parg);
        if (err == -ENOIOCTLCMD)
-               err = -EINVAL;
+               err = -ENOTTY;
 
        if (has_array_args) {
                *kernel_ptr = user_ptr;