[media] uvcvideo: Return -ENOTTY in case of unknown ioctl
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 18 Dec 2011 23:22:50 +0000 (20:22 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 19 Mar 2012 17:06:27 +0000 (14:06 -0300)
-EINVAL is the wrong error code in that case, replace it with -ENOTTY.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_v4l2.c

index 2ae4f880ea05ed5bd67bee2a4816fcea7ed464ae..f09ee8b2ea54060e0e5f8a1089573420dc569b55 100644 (file)
@@ -1012,7 +1012,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
 
        default:
                uvc_trace(UVC_TRACE_IOCTL, "Unknown ioctl 0x%08x\n", cmd);
-               return -EINVAL;
+               return -ENOTTY;
        }
 
        return ret;