[media] v4l: omap4iss: Don't check for missing get_fmt op on remote subdev
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:53:38 +0000 (17:53 -0200)
The remote subdev of any video node in the OMAP4 ISS is an internal
subdev that is guaranteed to implement get_fmt. Don't check the return
value for -ENOIOCTLCMD, as this can't happen.

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 a527330abc34a8ccc67f1a59292d6d4ab5d32eba..0cb58206a564339044a7ad962f108a126bd8f6b6 100644 (file)
@@ -248,8 +248,6 @@ __iss_video_get_format(struct iss_video *video, struct v4l2_format *format)
        fmt.pad = pad;
        fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
        ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt);
-       if (ret == -ENOIOCTLCMD)
-               ret = -EINVAL;
 
        mutex_unlock(&video->mutex);
 
@@ -552,7 +550,7 @@ iss_video_try_format(struct file *file, void *fh, struct v4l2_format *format)
        fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
        ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt);
        if (ret)
-               return ret == -ENOIOCTLCMD ? -EINVAL : ret;
+               return ret;
 
        iss_video_mbus_to_pix(video, &fmt.format, &format->fmt.pix);
        return 0;