[media] v4l: omap4iss: Translate -ENOIOCTLCMD to -ENOTTY
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 3 Nov 2013 23:28:24 +0000 (20:28 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 3 Dec 2013 19:54:55 +0000 (17:54 -0200)
Translating -ENOIOCTLCMD to -EINVAL is invalid, the correct ioctl return
value is -ENOTTY.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/omap4iss/iss_video.c

index 0cb58206a564339044a7ad962f108a126bd8f6b6..63419b3769b5e792bea0435327490e08ec7092c2 100644 (file)
@@ -571,7 +571,7 @@ iss_video_cropcap(struct file *file, void *fh, struct v4l2_cropcap *cropcap)
        ret = v4l2_subdev_call(subdev, video, cropcap, cropcap);
        mutex_unlock(&video->mutex);
 
-       return ret == -ENOIOCTLCMD ? -EINVAL : ret;
+       return ret == -ENOIOCTLCMD ? -ENOTTY : ret;
 }
 
 static int
@@ -598,7 +598,7 @@ iss_video_get_crop(struct file *file, void *fh, struct v4l2_crop *crop)
        format.which = V4L2_SUBDEV_FORMAT_ACTIVE;
        ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &format);
        if (ret < 0)
-               return ret == -ENOIOCTLCMD ? -EINVAL : ret;
+               return ret == -ENOIOCTLCMD ? -ENOTTY : ret;
 
        crop->c.left = 0;
        crop->c.top = 0;
@@ -623,7 +623,7 @@ iss_video_set_crop(struct file *file, void *fh, const struct v4l2_crop *crop)
        ret = v4l2_subdev_call(subdev, video, s_crop, crop);
        mutex_unlock(&video->mutex);
 
-       return ret == -ENOIOCTLCMD ? -EINVAL : ret;
+       return ret == -ENOIOCTLCMD ? -ENOTTY : ret;
 }
 
 static int
This page took 0.039035 seconds and 5 git commands to generate.